diff --git a/push_file.sh b/push_file.sh index a2c258c..37f54b0 100755 --- a/push_file.sh +++ b/push_file.sh @@ -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 \ No newline at end of file