mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-23 23:06:06 +08:00
修改reload pm2逻辑
This commit is contained in:
parent
2f89494185
commit
e5ec982891
|
@ -281,13 +281,27 @@ update_qinglong() {
|
||||||
echo -e "重启面板中..."
|
echo -e "重启面板中..."
|
||||||
nginx -s reload 2>/dev/null || nginx -c /etc/nginx/nginx.conf
|
nginx -s reload 2>/dev/null || nginx -c /etc/nginx/nginx.conf
|
||||||
sleep 1
|
sleep 1
|
||||||
pm2 reload all >/dev/null 2>&1
|
reload_pm2
|
||||||
else
|
else
|
||||||
echo -e "\n更新$dir_root失败,请检查原因...\n"
|
echo -e "\n更新$dir_root失败,请检查原因...\n"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
reload_pm2() {
|
||||||
|
if [[ $(pm2 info panel 2>/dev/null) ]]; then
|
||||||
|
pm2 reload panel >/dev/null 2>&1
|
||||||
|
else
|
||||||
|
pm2 start $dir_root/build/app.js -n panel >/dev/null 2>&1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $(pm2 info schedule 2>/dev/null) ]]; then
|
||||||
|
pm2 reload schedule >/dev/null 2>&1
|
||||||
|
else
|
||||||
|
pm2 start $dir_root/build/schedule.js -n schedule >/dev/null 2>&1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
## 对比脚本
|
## 对比脚本
|
||||||
diff_scripts() {
|
diff_scripts() {
|
||||||
local dir_current=$(pwd)
|
local dir_current=$(pwd)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user