From 64d7611576f2d2bcb495c5576a2873abc73b701f Mon Sep 17 00:00:00 2001 From: jenz Date: Sat, 2 Apr 2022 12:57:54 +0200 Subject: [PATCH] made the ingame autism bots into systemctl services finally --- AutismBotIngame/autismrunner@.service | 17 +++++++++++++++++ AutismBotIngame/python/run_autismbot.sh | 4 ++++ 2 files changed, 21 insertions(+) create mode 100644 AutismBotIngame/autismrunner@.service create mode 100644 AutismBotIngame/python/run_autismbot.sh diff --git a/AutismBotIngame/autismrunner@.service b/AutismBotIngame/autismrunner@.service new file mode 100644 index 00000000..b021ebd2 --- /dev/null +++ b/AutismBotIngame/autismrunner@.service @@ -0,0 +1,17 @@ +[Unit] +Description=autism_runner%i + +[Service] +User=autismbot%i +Group=autismbot%i +WorkingDirectory=/home/autismbot%i/ze_runner +Environment=PATH=/home/autismbot%i/ze_runner/venv/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games +ExecStart=/home/autismbot%i/ze_runner/run_autismbot.sh +Restart=on-failure +RestartSec=10 + +#Restart=always + +[Install] +WantedBy=default.target + diff --git a/AutismBotIngame/python/run_autismbot.sh b/AutismBotIngame/python/run_autismbot.sh new file mode 100644 index 00000000..9ac880d3 --- /dev/null +++ b/AutismBotIngame/python/run_autismbot.sh @@ -0,0 +1,4 @@ +#!/bin/bash +cd "$(dirname "$0")" +source venv/bin/activate +python3 -u ingamefollowct.py