Avoid repeated emails on tor failure

This commit is contained in:
Bob Mottram 2018-05-04 15:12:43 +01:00
parent 59af1821b9
commit dc73d01410
1 changed files with 1 additions and 1 deletions

View File

@ -322,8 +322,8 @@ function check_tor_health {
echo ' fi'; echo ' fi';
echo ' exit 0'; echo ' exit 0';
echo 'fi'; 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 '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 ' touch /tmp/.torfailed';
echo 'fi'; } > /usr/bin/check_tor_health echo 'fi'; } > /usr/bin/check_tor_health
chmod +x /usr/bin/check_tor_health chmod +x /usr/bin/check_tor_health