From 5fc728861ff1b7c0198a3a28d425c824dc78a8c4 Mon Sep 17 00:00:00 2001 From: Marco Loewe Date: Mon, 13 Nov 2023 11:34:18 +0100 Subject: [PATCH] Updated update script --- update.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/update.sh b/update.sh index 658d925..70764fc 100755 --- a/update.sh +++ b/update.sh @@ -1,6 +1,15 @@ #!/bin/bash +restart-bot() { + USERFILE=~/.config/systemd/user/discord-bot.service + if [ -f "$USERFILE" ]; then + systemctl --user restart discord-bot + else + systemctl restart discord-bot + fi +} + echo 'Updating...' git pull origin master echo 'Finished. Starting bot...' -systemctl --user restart discord-bot +restart-bot