Skip to content

Instantly share code, notes, and snippets.

@dkalisch
Last active December 24, 2015 11:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dkalisch/6793824 to your computer and use it in GitHub Desktop.
Save dkalisch/6793824 to your computer and use it in GitHub Desktop.
#!/bin/sh
if ps -ef | grep -v grep | grep tweetHarvest.py ; then
exit 0
else
python /PATH/TO/YOUR/tweetHarvest.py &
#Write note to Logfile
echo "[`date`]: twitter.py was not running... Restarted" >> /var/log/twitterHarvest.log
exit 0
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment