badgey/cicd/deploy.sh

9 lines
270 B
Bash
Executable File

#!/bin/bash
bot=$(echo "$1" | tr '[:upper:]' '[:lower:]')
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