From dc73d01410756cb68593ced414a321c76ef58cba Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 4 May 2018 15:12:43 +0100 Subject: [PATCH] Avoid repeated emails on tor failure --- src/freedombone-utils-onion | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/freedombone-utils-onion b/src/freedombone-utils-onion index 350533b2..9c510ad4 100755 --- a/src/freedombone-utils-onion +++ b/src/freedombone-utils-onion @@ -322,8 +322,8 @@ function check_tor_health { echo ' fi'; echo ' exit 0'; echo 'fi'; - echo "tail -n 3 /var/log/tor/notices.log | mail -s \"[${PROJECT_NAME}] Tor status is \$status\" \$ADMIN_USER@\$HOSTNAME"; echo 'if [ ! -f /tmp/.torfailed ]; then'; + echo " tail -n 3 /var/log/tor/notices.log | mail -s \"[${PROJECT_NAME}] Tor status is \$status\" \$ADMIN_USER@\$HOSTNAME"; echo ' touch /tmp/.torfailed'; echo 'fi'; } > /usr/bin/check_tor_health chmod +x /usr/bin/check_tor_health