npm 启动增加 reload 逻辑

This commit is contained in:
whyour 2024-07-14 14:37:26 +08:00
parent 20d668e691
commit dbf6577f39

View File

@ -27,6 +27,14 @@ if [[ ! $QL_DATA_DIR ]]; then
exit 1 exit 1
fi fi
command="$1"
if [[ $command == "reload" ]]; then
mkdir -p /run/nginx
nginx -s reload 2>/dev/null || nginx -c /etc/nginx/nginx.conf
exit 1
fi
# 安装依赖 # 安装依赖
os_name=$(source /etc/os-release && echo "$ID") os_name=$(source /etc/os-release && echo "$ID")
@ -92,6 +100,9 @@ if [[ $EnableExtraShell == true ]]; then
echo -e "自定义脚本后台执行中...\n" echo -e "自定义脚本后台执行中...\n"
fi fi
pm2 startup
pm2 save
echo -e "############################################################\n" echo -e "############################################################\n"
echo -e "启动完成..." echo -e "启动完成..."
echo -e "############################################################\n" echo -e "############################################################\n"