From 7953399bb8e7aaaae88ce441cccc91de04f857f7 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Sun, 9 Feb 2020 18:40:56 +0000 Subject: [PATCH] Revert "Remove UNO bot" This reverts commit c106d221359ad75d70b68460f0d7726695d3a073. Signed-off-by: Harsh Shandilya --- systemd_units/uno-bot.service | 30 ++++++++++++++++++++++++++++++ systemd_units/update.sh | 2 +- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 systemd_units/uno-bot.service diff --git a/systemd_units/uno-bot.service b/systemd_units/uno-bot.service new file mode 100644 index 0000000..d4513b4 --- /dev/null +++ b/systemd_units/uno-bot.service @@ -0,0 +1,30 @@ +[Unit] +Description=UNO Telegram bot service +After=network.target + +[Service] +Restart=on-abort +Type=simple +User=bot +WorkingDirectory=/home/bot/mau_mau_bot +ExecStart=/home/bot/mau_mau_bot/venv/bin/python bot.py +ExecReload=/bin/kill -USR1 $MAINPID +KillMode=mixed +KillSignal=SIGQUIT +TimeoutStopSec=5s + +# Security +PrivateTmp=true +ProtectSystem=full +NoNewPrivileges=true +ProtectControlGroups=true +ProtectKernelModules=true +ProtectKernelTunables=true +PrivateDevices=true +RestrictAddressFamilies=AF_INET AF_INET6 +RestrictNamespaces=true +RestrictRealtime=true +SystemCallArchitectures=native + +[Install] +WantedBy=multi-user.target diff --git a/systemd_units/update.sh b/systemd_units/update.sh index 1845ccc..27ccee2 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' 'goaccess' 'mirror-bot' 'mirror-bot-2' 'mkr-bin' 'walls-bot') +declare -a services=('caddy' 'goaccess' 'mirror-bot' 'mirror-bot-2' 'mkr-bin' 'uno-bot' 'walls-bot') # Now loop through each service and install it for service in "${services[@]}"; do