Skip to content

Instantly share code, notes, and snippets.

@endofline
Last active August 29, 2015 14:14
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 endofline/34fc36cfbd149bcc7d15 to your computer and use it in GitHub Desktop.
Save endofline/34fc36cfbd149bcc7d15 to your computer and use it in GitHub Desktop.
psuedo-daemonised bot (infinite bash loop)
#!/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
@endofline
Copy link
Author

chmod +x above file, then add @reboot /path/to/run-hangupsbot.sh via crontab -e

running the bot as a different user? prepend sudo -u altuser to the python3 call

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment