From 12d96a9d7c35ac8a815c5126fcfa825d98778558 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Sun, 10 Nov 2019 10:24:18 +0530 Subject: [PATCH] systemd: Add pyrobud Signed-off-by: Harsh Shandilya --- systemd_units/pyrobud.service | 20 ++++++++++++++++++++ systemd_units/update.sh | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 systemd_units/pyrobud.service diff --git a/systemd_units/pyrobud.service b/systemd_units/pyrobud.service new file mode 100644 index 0000000..65eaa63 --- /dev/null +++ b/systemd_units/pyrobud.service @@ -0,0 +1,20 @@ +[Unit] +Description=Pyrobud Telegram userbot service +After=network.target + +[Service] +Restart=on-abort +Type=simple +User=bot +WorkingDirectory=/home/bot/pyrobud +ExecStart=/home/bot/pyrobud/venv/bin/python main.py +ExecReload=/bin/kill -USR1 $MAINPID +KillMode=mixed +KillSignal=SIGQUIT +TimeoutStopSec=5s +PrivateTmp=true +PrivateDevices=false +ProtectSystem=full + +[Install] +WantedBy=multi-user.target diff --git a/systemd_units/update.sh b/systemd_units/update.sh index 4d82f77..97729c4 100755 --- a/systemd_units/update.sh +++ b/systemd_units/update.sh @@ -8,7 +8,7 @@ function prettyPrint { } # Grab all service names -declare -a services=('caddy' 'daas' 'gitea' 'mirror-bot' 'mirror-bot-2' 'uno-bot' 'walls-bot') +declare -a services=('caddy' 'daas' 'gitea' 'mirror-bot' 'mirror-bot-2' 'pyrobud' 'uno-bot' 'walls-bot') # Now loop through each service and install it for service in "${services[@]}"; do