Skip to content

Instantly share code, notes, and snippets.

@Karunamon
Created July 22, 2016 15:43
Show Gist options
  • Save Karunamon/a638121d6b69b2f20339851d1550fffd to your computer and use it in GitHub Desktop.
Save Karunamon/a638121d6b69b2f20339851d1550fffd to your computer and use it in GitHub Desktop.
Systemd unit for a Twitch bot
[Unit]
Description=Red-DiscordBot
After=Network.target
[Service]
Type=simple
#Yeah, it's discouraged to run as root, but this is a single purpose VM. Change user appropriately, and make sure to update the workingdirectory.
User=root
ExecStart=/usr/bin/python3.5 /root/Red-DiscordBot/red.py
Restart=on-abort
WorkingDirectory=/root/Red-DiscordBot/
[Install]
Alias=twitchbot
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment