mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-22 22:36:06 +08:00
修改进程判断命令
This commit is contained in:
parent
3232f1efa4
commit
5b9c38385a
|
@ -14,8 +14,9 @@ nginx -s reload 2>/dev/null || nginx -c /etc/nginx/nginx.conf
|
|||
echo -e "nginx启动成功...\n"
|
||||
|
||||
echo -e "======================3. 启动控制面板========================\n"
|
||||
cd $dir_root
|
||||
if [[ $(pm2 info panel 2>/dev/null) ]]; then
|
||||
|
||||
app_pid=$(ps -ef | grep "app.js" | grep -v grep)
|
||||
if [ "$app_pid" != "" ]; then
|
||||
pm2 reload panel
|
||||
else
|
||||
pm2 start $dir_root/build/app.js -n panel
|
||||
|
@ -23,8 +24,9 @@ fi
|
|||
echo -e "控制面板启动成功...\n"
|
||||
|
||||
echo -e "======================4. 启动定时任务========================\n"
|
||||
cd $dir_root
|
||||
if [[ $(pm2 info schedule 2>/dev/null) ]]; then
|
||||
|
||||
schedule_pid=$(ps -ef | grep "schedule.js" | grep -v grep)
|
||||
if [ "$schedule_pid" != "" ]; then
|
||||
pm2 reload schedule
|
||||
else
|
||||
pm2 start $dir_root/build/schedule.js -n schedule
|
||||
|
@ -33,7 +35,6 @@ echo -e "定时任务启动成功...\n"
|
|||
|
||||
if [[ $AutoStartBot == true ]]; then
|
||||
echo -e "======================5. 启动bot========================\n"
|
||||
cd $dir_root
|
||||
ql bot
|
||||
fi
|
||||
|
||||
|
|
|
@ -298,13 +298,15 @@ update_qinglong() {
|
|||
}
|
||||
|
||||
reload_pm2() {
|
||||
if [[ $(pm2 info panel 2>/dev/null) ]]; then
|
||||
local app_pid=$(ps -ef | grep "app.js" | grep -v grep)
|
||||
if [ "$app_pid" != "" ]; 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
|
||||
local schedule_pid=$(ps -ef | grep "schedule.js" | grep -v grep)
|
||||
if [ "$schedule_pid" != "" ]; then
|
||||
pm2 reload schedule >/dev/null 2>&1
|
||||
else
|
||||
pm2 start $dir_root/build/schedule.js -n schedule >/dev/null 2>&1
|
||||
|
@ -355,7 +357,7 @@ gen_list_repo() {
|
|||
rm -f $dir_list_tmp/${repo}*.list >/dev/null 2>&1
|
||||
|
||||
cd ${repo_path}
|
||||
|
||||
|
||||
local cmd="find ."
|
||||
local index=0
|
||||
for extension in $file_extensions; do
|
||||
|
|
Loading…
Reference in New Issue
Block a user