#!/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