Skip to content

Commit

Permalink
🔨 script(transfer.sh): add cmd to kill process
Browse files Browse the repository at this point in the history
  • Loading branch information
M0rtzz committed Dec 30, 2024
1 parent 0e053cd commit 300337a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions transfer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ echo $'\e[1;32m开始传输静态资源...\e[0m'

scp out.zip "${remote_user}"@"${remote_host}":"${remote_folder}"

ssh "${remote_user}"@"${remote_host}" "lsof -i :80 -i :443 | awk 'NR!=1 {print \$2}' | xargs -r kill -9 && echo $'\e[1;32mkill process success\e[0m' || echo $'\e[1;31mkill process fail\e[0m'"

ssh "${remote_user}"@"${remote_host}" "nginx -s stop && echo $'\e[1;32mnginx -s stop success\e[0m' || echo $'\e[1;31mnginx -s stop fail\e[0m'"

ssh "${remote_user}"@"${remote_host}" "rm -rf ${remote_folder}out/ ${remote_folder}.next/"
Expand Down

0 comments on commit 300337a

Please sign in to comment.