DiscordBot/update.sh
2023-11-13 11:34:18 +01:00

16 lines
306 B
Bash
Executable File

#!/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...'
restart-bot