From f26a10e64370561b3413160760be1b7a54cb2d21 Mon Sep 17 00:00:00 2001 From: fscarmen <62703343+fscarmen@users.noreply.github.com> Date: Sun, 10 Apr 2022 12:03:05 +0800 Subject: [PATCH] Update unlock.sh --- unlock.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unlock.sh b/unlock.sh index 01a1ac9..b733ee6 100644 --- a/unlock.sh +++ b/unlock.sh @@ -182,7 +182,7 @@ check_warp(){ # 在已安装 Client 的前提下,区分模式 Mode if type -P warp-cli >/dev/null 2>&1; then - systemctl is-active warp-svc >/dev/null 2>&1 || systemctl start warp-svc + ! systemctl is-active warp-svc >/dev/null 2>&1 && systemctl start warp-svc && sleep 5 if [[ $(warp-cli --accept-tos settings) =~ WarpProxy ]]; then [[ $(ss -nltp) =~ 'warp-svc' ]] && CLIENT_PORT=$(ss -nltp | grep warp-svc | grep -oP '127.0*\S+' | cut -d: -f2) && STATUS[2]=1 || STATUS[2]=0 else