From a54a3809fd7f7b5a28e1f1bd31f4003a4c12fdb2 Mon Sep 17 00:00:00 2001 From: Dmitry Afanasyev Date: Mon, 8 Aug 2022 16:58:57 +0300 Subject: [PATCH] add deamon service --- scripts/mosgortrans.service | 5 ++--- scripts/{shutdown-bot.sh => stop-bot.sh} | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) rename scripts/{shutdown-bot.sh => stop-bot.sh} (50%) diff --git a/scripts/mosgortrans.service b/scripts/mosgortrans.service index 4bef958..8fee2cf 100644 --- a/scripts/mosgortrans.service +++ b/scripts/mosgortrans.service @@ -2,11 +2,10 @@ Description=MosGorTrans bot Wants=network-online.target After=network-online.target - [Service] Restart=always WorkingDirectory=/opt/mosgortrans -ExecStart=scripts/start-bot.sh -ExecStop=scripts/shutdown-bot.sh +ExecStart=/bin/bash /opt/mosgortrans/scripts/start-bot.sh +ExecStop=/bin/bash /opt/mosgortrans/scripts/stop-bot.sh [Install] WantedBy=multi-user.target \ No newline at end of file diff --git a/scripts/shutdown-bot.sh b/scripts/stop-bot.sh similarity index 50% rename from scripts/shutdown-bot.sh rename to scripts/stop-bot.sh index 44a725b..e5d3954 100644 --- a/scripts/shutdown-bot.sh +++ b/scripts/stop-bot.sh @@ -2,5 +2,5 @@ echo "shutting down the bot" -bash killall python; -bash killall firefox; \ No newline at end of file +killall python; +killall firefox; \ No newline at end of file