automatically restart server

This commit is contained in:
Daniella / Tove 2024-06-10 21:18:31 +02:00
parent b7b630e309
commit be888848c2
Signed by: TudbuT
GPG key ID: B3CF345217F202D3

View file

@ -5,5 +5,6 @@
echo "$SSH_PRIVATEKEY" > ssh_key
chmod 700 ssh_key
scp -o StrictHostKeyChecking=no -i ssh_key -P "$BB_PORT" "$1" "root@$BB_HOST:$BB_PATH"
scp -o StrictHostKeyChecking=no -i ssh_key -P "$BB_PORT" "$1" "root@$BB_HOST:$BB_PATH" &&
(ssh -o StrictHostKeyChecking=no -i ssh_key -p "$BB_PORT" "root@$BB_HOST" "cd $BB_PATH && bash $(basename "$1").sh" || true)
rm ssh_key