From 203cbcba9e74e12aeb52159436aa7ba27f839872 Mon Sep 17 00:00:00 2001 From: darkclip Date: Thu, 4 Jan 2024 04:36:21 +0800 Subject: [PATCH] update --- wg-watch.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/wg-watch.sh b/wg-watch.sh index 31c4295a..5f0bc821 100755 --- a/wg-watch.sh +++ b/wg-watch.sh @@ -267,11 +267,12 @@ already_running(){ if [ $self = $proc ]; then pos=$num_unique; fi; - done - num_raw=$(echo "$cmds"|wc -l); + done; if [ $num_occur -le 5 ]; then - echo 0; - exit; + if [ $num_unique -eq $pos ]; then + echo 0; + exit; + fi; fi; echo 1; };