2 Commits

Author SHA1 Message Date
JackWhh
eefd2bdfdd 1
Signed-off-by: JackWhh <5264499+jack_whh@user.noreply.gitee.com>
2024-07-19 03:33:07 +00:00
JackWhh
20e64abc17 1
Signed-off-by: JackWhh <5264499+jack_whh@user.noreply.gitee.com>
2024-07-19 03:32:40 +00:00

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh -l
#set -e at the top of your script will make the script exit with an error whenever an error occurs (and is not explicitly handled)
set -eu
@@ -72,9 +72,13 @@ if [ -z != ${11} ]; then
ssh -o StrictHostKeyChecking=no -p $3 -i $TEMP_SSH_PRIVATE_KEY_FILE $1@$2 "$script"
echo "-----"
script1="./usr/local/transport-api/restart.sh restart"
echo $script
echo $script1
ssh -o StrictHostKeyChecking=no -p $3 -i $TEMP_SSH_PRIVATE_KEY_FILE $1@$2 "$script1"
echo "-----"
script2="sh /usr/local/transport-api/restart.sh restart"
echo $scscript2ript
ssh -o StrictHostKeyChecking=no -p $3 -i $TEMP_SSH_PRIVATE_KEY_FILE $1@$2 "$script2"
echo "-----"
fi
echo 'Deploy Success'