From 43a1219c6c3cf93223678c8bae2a5fcf2a6357a8 Mon Sep 17 00:00:00 2001 From: JackWhh <5264499+jack_whh@user.noreply.gitee.com> Date: Fri, 19 Jul 2024 05:57:37 +0000 Subject: [PATCH] 1 Signed-off-by: JackWhh <5264499+jack_whh@user.noreply.gitee.com> --- entrypoint.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/entrypoint.sh b/entrypoint.sh index b3dd9d5..311998c 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -35,6 +35,12 @@ if [ -z != ${10} ]; then #-o StrictHostKeyChecking=no avoid Host key verification failed. SSHPASS=${10} sshpass -e sftp -oBatchMode=no -b $TEMP_SFTP_FILE -P $3 $8 -o StrictHostKeyChecking=no $1@$2 + if [ -n "${11}" ]; then + echo "${11}" > $TEMP_SSH_SHELL_FILE + cat $TEMP_SSH_SHELL_FILE + echo Start Run Command + sh -c "sshpass -p 10 ssh -o StrictHostKeyChecking=no -p $3 $1@$2 < $TEMP_SSH_SHELL_FILE" + fi echo 'Deploy Success' exit 0