From dbf6577f3949fd360b800e592e4298ac0eb84eed Mon Sep 17 00:00:00 2001 From: whyour Date: Sun, 14 Jul 2024 14:37:26 +0800 Subject: [PATCH] =?UTF-8?q?npm=20=E5=90=AF=E5=8A=A8=E5=A2=9E=E5=8A=A0=20re?= =?UTF-8?q?load=20=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shell/start.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) 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"