Last active
April 5, 2016 22:06
-
-
Save glamrock/77c9d22b6780899604dd2baebfa5f6d9 to your computer and use it in GitHub Desktop.
cron job to detect if tor is up and if it isn't, to start the process
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# 10/10 janky af | |
time=$(date) | |
tor=$(tor runasdaemon 1) | |
if pgrep -x "tor" > /dev/null | |
then echo "$time" >> torlogup.txt | |
else | |
$tor #run tor | |
echo "$time" >> tordownlog.txt | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment