From 29a4c3b1e0da77ef8d38b827d79e1affdfa5ae16 Mon Sep 17 00:00:00 2001 From: qloog Date: Mon, 16 May 2022 17:45:47 +0800 Subject: [PATCH] fix(admin): start cmd and tips --- scripts/admin.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/admin.sh b/scripts/admin.sh index dde6960..8084477 100755 --- a/scripts/admin.sh +++ b/scripts/admin.sh @@ -14,9 +14,16 @@ function start() exit 1 fi + # set default + if [ "$ENV" = "" ]; then + ARGS="-c config/local" + else + ARGS="-c config/$ENV" + fi + nohup $BASE_DIR/$SERVER $ARGS server &>/dev/null & - echo "sleeping..." && sleep $INTERVAL + echo "starting..." && sleep $INTERVAL # check status if [ "`pgrep $SERVER -u $UID`" == "" ];then @@ -40,7 +47,7 @@ function stop() kill -9 `pgrep $SERVER -u $UID` fi - echo "sleeping..." && sleep $INTERVAL + echo "stopping..." && sleep $INTERVAL if [ "`pgrep $SERVER -u $UID`" != "" ];then echo "$SERVER stop failed"