Last active
January 28, 2018 10:46
-
-
Save deeravenger/6a9535c3457e04f6ce2380d6c4c16694 to your computer and use it in GitHub Desktop.
This file contains 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 | |
cd /test_last/ | |
if lsof -Pi :7772 -sTCP:LISTEN -t >/dev/nul; then | |
echo "Working" | |
else | |
echo "Not working.Starting..." | |
python3 bot.py | |
fi |
This file contains 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
* * * * * /usr/bin/flock -n /run/lock/bot.lock python /homes/user/bot/bot.py |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment