共用配置文件导入
This commit is contained in:
19
update.sh
19
update.sh
@@ -17,22 +17,3 @@ ssh $host "pm2 reload webp"
|
||||
|
||||
# 删除旧文件
|
||||
ssh $host "rm ~/webp/main_old"
|
||||
|
||||
|
||||
# pm2 start /root/webp/main --name webp --watch
|
||||
|
||||
# 查看 main_ 的進程, 然後使用 kill -9 强制关闭
|
||||
# ssh $host "ps -ef | grep -v grep | grep ./main"
|
||||
# ssh $host "kill -9 \`ps -ef | grep -v grep | grep ./main | awk '{print \$2}'\`"
|
||||
|
||||
# 重启服务, 保持服务不被关闭 (pkill ./main; 無效, 還需防止 nohup 不退出)
|
||||
#ssh $host "rm ./main; mv ./main_new ./main;"
|
||||
#ssh $host "nohup ./main test >> nohup.out 2>&1 &"
|
||||
#ssh $host "nohup ./main server >> nohup.out 2>&1 &"
|
||||
#ssh $host "ps -ef | grep -v grep | grep ./main"
|
||||
|
||||
# 查看日志
|
||||
# ssh root@47.103.40.152 "tail -fn 50 nohup.out"
|
||||
|
||||
# 查看所有進程, 排除grep, 只看本用戶, 排除進程名帶方括號的, 排除lib, 排除bash, 排除sshd, 按照進程名排序, 對 main 高亮爲紅色
|
||||
#ssh root@47.103.40.152 "ps -ef | grep -v grep | grep \$USER | grep -v '\[' | grep -v /lib | grep -v bash | grep -v sshd | grep -v /sbin | sort -k 8"
|
||||
|
Reference in New Issue
Block a user