diff --git a/shell/start.sh b/shell/start.sh index 1f71f00c..fc402b56 100644 --- a/shell/start.sh +++ b/shell/start.sh @@ -27,6 +27,14 @@ if [[ ! $QL_DATA_DIR ]]; then exit 1 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") @@ -92,6 +100,9 @@ if [[ $EnableExtraShell == true ]]; then echo -e "自定义脚本后台执行中...\n" fi +pm2 startup +pm2 save + echo -e "############################################################\n" echo -e "启动完成..." echo -e "############################################################\n"