aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Vitor Luis2019-03-13 19:01:31 +0100
committerGravatar GitHub2019-03-13 19:01:31 +0100
commit3f04c1cff1b8c251638512e894c4865201a79cf4 (patch)
treecf21c33ab61c4d83c4c179279ef69dfb7dfbf199
parentAdd 'api-port' setting to bot.conf and use it in rest_api.py (diff)
Create bitbot.service
Systemd script to use with Ubuntu 18.04 LTS (tested) or similar.
-rw-r--r--bitbot.service20
1 files changed, 20 insertions, 0 deletions
diff --git a/bitbot.service b/bitbot.service
new file mode 100644
index 00000000..0640fac7
--- /dev/null
+++ b/bitbot.service
@@ -0,0 +1,20 @@
+# This systemd script was made to be used in Ubuntu 18.04 LTS
+# Check your distro docs and make the appropriate changes if needed
+
+[Unit]
+Description=BitBot Service
+Wants=network-online.target
+After=network-online.target
+
+[Service]
+User=$USER
+Group=$GROUP
+WorkingDirectory=/home/$USER/bitbot
+ExecStart=/usr/bin/python3 start.py
+ExecReload=/bin/kill -HUP $MAINPID
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
+
+# Remember to change $USER and $GROUP with your actual shell username