From 03a6030a41b9f031067593709ee46c633b5cf019 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Mon, 16 Dec 2019 19:38:25 +0800 Subject: [PATCH] 1 --- server/bin/monitor.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/server/bin/monitor.sh b/server/bin/monitor.sh index d9f3d51..bb8ac6a 100644 --- a/server/bin/monitor.sh +++ b/server/bin/monitor.sh @@ -1 +1,11 @@ -python ../../third_party/tools/scripts/server/monitor.py wsproxy2001 '-n1 -i1' +path_arr=$(echo $PWD|tr '/' '\n') +path_arr=(${path_arr}) +GAME_ID=${path_arr[-5]} + +if echo $GAME_ID | grep -q '[^0-9]' +then + echo 'game_id参数必须为数字' + exit 1 +fi + +python ../../third_party/tools/scripts/server/monitor.py wsproxy${GAME_ID} '-n1 -i1'