badgey/cicd/deploy.sh

11 lines
308 B
Bash
Executable File

#!/bin/bash
bot=$(echo "$1" | tr '[:upper:]' '[:lower:]')
echo "Running deploy for bot ${bot}"
ssh $bot@$bot sudo /usr/bin/systemctl stop $bot
rsync -avP badgey $bot@$bot:/srv/$bot/
rsync -avP config $bot@$bot:/srv/$bot/
rsync -avP txt $bot@$bot:/srv/$bot/
ssh $bot@$bot sudo /usr/bin/systemctl start $bot