NobGit
public imalexnord read

Discord-Hetzner-Bot

No description yet

Languages

Repository composition by tracked source files.

Python
Python 100%
Create file Wiki Documentation
Clone
https://nobgit.com/user/imalexnord/discord-hetzner-bot.git
ssh://[email protected]:2222/user/imalexnord/discord-hetzner-bot.git

Commit

Added service unit and a shebang in the main script

118993c
err0x5dd <[email protected]> 7 years ago
discord-bot.service | 14 ++++++++++++++
 gameserver.py       |  2 ++
 2 files changed, 16 insertions(+)
 create mode 100644 discord-bot.service

Diff

diff --git a/discord-bot.service b/discord-bot.service
new file mode 100644
index 0000000..8093e7a
--- /dev/null
+++ b/discord-bot.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Discord Bot for HetznerAPI
+After=network.target
+
+[Service]
+Type=simple
+User=discord-bot
+ExecStart=/opt/discord-bot/Discord-Hetzner-Bot/gameserver.py
+Restart=always
+RestartSec=5
+StartLimitBurst=10
+
+[Install]
+WantedBy=multi-user.target
diff --git a/gameserver.py b/gameserver.py
index ab4e1e7..431709c 100644
--- a/gameserver.py
+++ b/gameserver.py
@@ -1,3 +1,5 @@
+#! /bin/python3
+
 from tokens import *
 from settings import *
 from game import *