Report tor status as starting if uptime is small

This commit is contained in:
Bob Mottram 2018-05-13 12:39:07 +01:00
parent 800ec2febc
commit 1daf58fcd2
1 changed files with 15 additions and 7 deletions

View File

@ -48,6 +48,8 @@ done < /var/log/tor/notices.log
mv /var/log/tor/notices_new.log /var/log/tor/notices.log
chown -R debian-tor:adm /var/log/tor
UPTIME=$(awk -F '.' '{print $1}' < "/proc/uptime")
if [ "$UPTIME" -gt 500 ]; then
if [ $ctr -gt 5 ]; then
echo $'Failed'
exit 0
@ -57,6 +59,12 @@ if [ $ctr -gt 0 ]; then
echo $'Poor'
exit 0
fi
else
if [ $ctr -gt 0 ]; then
echo $'Starting'
exit 0
fi
fi
echo $'Good'
exit 0