Last active
August 29, 2015 14:14
-
-
Save endofline/34fc36cfbd149bcc7d15 to your computer and use it in GitHub Desktop.
psuedo-daemonised bot (infinite bash loop)
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 | |
while true | |
do | |
# blocking call until SIGINT received or /bot quit | |
python3 -u /<username>/bot/hangupsbot/hangupsbot.py -d > /<username>/bot-stdout.log | |
# sleep 3 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
chmod +x
above file, then add@reboot /path/to/run-hangupsbot.sh
viacrontab -e
running the bot as a different user? prepend
sudo -u altuser
to the python3 call