From 2001c61b17bd1a9d56e6629905d57df5cb43f702 Mon Sep 17 00:00:00 2001 From: Xyon Date: Sat, 12 Oct 2024 16:30:18 +0100 Subject: [PATCH] retain badgey user, set exec perms on delivered binary --- cicd/deploy.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/cicd/deploy.sh b/cicd/deploy.sh index 3e2098d..2aa4035 100755 --- a/cicd/deploy.sh +++ b/cicd/deploy.sh @@ -4,8 +4,9 @@ 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 \ No newline at end of file +ssh badgey@$bot sudo /usr/bin/systemctl stop $bot +rsync -avP badgey badgey@$bot:/srv/$bot/$bot +rsync -avP config badgey@$bot:/srv/$bot/ +rsync -avP txt badgey@$bot:/srv/$bot/ +ssh badgey@$bot sudo chmod a+x /srv/$bot/$bot +ssh badgey@$bot sudo /usr/bin/systemctl start $bot \ No newline at end of file