Skip to content
Snippets Groups Projects
Commit 1daf58fc authored by Bob Mottram's avatar Bob Mottram
Browse files

Report tor status as starting if uptime is small

parent 800ec2fe
No related branches found
No related tags found
No related merge requests found
......@@ -48,14 +48,22 @@ 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
if [ $ctr -gt 5 ]; then
echo $'Failed'
exit 0
fi
UPTIME=$(awk -F '.' '{print $1}' < "/proc/uptime")
if [ "$UPTIME" -gt 500 ]; then
if [ $ctr -gt 5 ]; then
echo $'Failed'
exit 0
fi
if [ $ctr -gt 0 ]; then
echo $'Poor'
exit 0
if [ $ctr -gt 0 ]; then
echo $'Poor'
exit 0
fi
else
if [ $ctr -gt 0 ]; then
echo $'Starting'
exit 0
fi
fi
echo $'Good'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment