hal-9000/cicd/deploy.sh

12 lines
385 B
Bash
Raw Normal View History

2025-05-03 11:50:44 +00:00
#!/bin/bash
bot=$(echo "$1" | tr '[:upper:]' '[:lower:]')
echo "Running deploy for bot ${bot}"
ssh badgey@hal-9000 sudo /usr/bin/systemctl stop $bot
2025-05-03 12:13:34 +00:00
rsync -avP $bot badgey@hal-9000:/srv/$bot/$bot
2025-05-03 11:50:44 +00:00
rsync -avP config badgey@hal-9000:/srv/$bot/
rsync -avP txt badgey@hal-9000:/srv/$bot/
ssh badgey@hal-9000 chmod a+x /srv/$bot/$bot
ssh badgey@hal-9000 sudo /usr/bin/systemctl start $bot