From d4d966ab19787ad58d0c29e631411fda7771c129 Mon Sep 17 00:00:00 2001 From: Adrien Bourmault Date: Mon, 1 Feb 2021 12:05:11 +0100 Subject: [PATCH] Corrected a dumb error with date calculation --- captcha/captcha.sh | 4 ++-- captcha/experimental.sh | 4 ++-- rapport_activite/rapport_activites.sh | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/captcha/captcha.sh b/captcha/captcha.sh index f7ffad2..ce87eac 100755 --- a/captcha/captcha.sh +++ b/captcha/captcha.sh @@ -70,9 +70,9 @@ INTRUS() R=$(($R % 100)) if [[ $R -lt 50 ]]; then - echo "Tapez | $NEWINPUT |en supprimant les ${DIGIT[$INTRUS]}" + echo "Tapez ce nombre en enlevant les ${DIGIT[$INTRUS]} | $NEWINPUT" else - echo "Saisissez | $NEWINPUT |en enlevant les ${DIGIT[$INTRUS]}" + echo "Saisissez ce nombre sans les ${DIGIT[$INTRUS]} | $NEWINPUT" fi } diff --git a/captcha/experimental.sh b/captcha/experimental.sh index 1302a9f..7fccd36 100755 --- a/captcha/experimental.sh +++ b/captcha/experimental.sh @@ -70,9 +70,9 @@ INTRUS() R=$(($R % 100)) if [[ $R -lt 50 ]]; then - echo "Tapez | $NEWINPUT |en supprimant les ${DIGIT[$INTRUS]}" + echo "Tapez ce nombre en enlevant les ${DIGIT[$INTRUS]} | $NEWINPUT" else - echo "Saisissez | $NEWINPUT |en enlevant les ${DIGIT[$INTRUS]}" + echo "Saisissez ce nombre sans les ${DIGIT[$INTRUS]} | $NEWINPUT" fi } diff --git a/rapport_activite/rapport_activites.sh b/rapport_activite/rapport_activites.sh index 7a64fa9..9b3ab06 100755 --- a/rapport_activite/rapport_activites.sh +++ b/rapport_activite/rapport_activites.sh @@ -26,7 +26,7 @@ main() { echo "" echo "h2. ## Audio/Video Call usage:" echo "" - echo "* Number of calls relayed: $(zgrep $DATE /var/log/ejabberd/ejabberd.log* | grep -i -e "Offering stun" | wc -l)" + echo "* Number of calls relayed: $(zgrep "$DATE" /var/log/ejabberd/ejabberd.log* | grep -i -e "Offering stun" | wc -l)" echo "* Data relayed per protocol per call:" echo "** UDP: avg $(get_avg_UDP_turn_relayed_data) KiB, max $(get_max_UDP_turn_relayed_data) KiB, total $(get_total_UDP_turn_relayed_data) KiB" echo "** TCP: avg $(get_avg_TCP_turn_relayed_data) KiB, max $(get_max_TCP_turn_relayed_data) KiB, total $(get_total_TCP_turn_relayed_data) KiB" @@ -107,7 +107,7 @@ get_last_month() { year="$(($(date +%Y)-1))" yearMonth="$year-$precedingMonth" fi - echo "$year-$precedingMonth" + echo $yearMonth } get_total_UDP_turn_relayed_data() {