diff --git a/scripts/libs/sb_endpoints.sh b/scripts/libs/sb_endpoints.sh index c3ad77f4..cabddcea 100644 --- a/scripts/libs/sb_endpoints.sh +++ b/scripts/libs/sb_endpoints.sh @@ -1,7 +1,7 @@ #!/bin/sh # Copyright (C) Juewuy -[ "$ts_service" = ON ] && grep -q '"tailscale"' "$CRASHDIR"/jsons/endpoints.json && { +[ "$ts_service" = ON ] && grep -q '"tailscale"' "$CRASHDIR"/jsons/endpoints.json 2>/dev/null && { [ "$ts_subnet" = true ] && { . "$CRASHDIR"/starts/fw_getlanip.sh && getlanip advertise_routes=$(echo "$host_ipv4"|sed 's/[[:space:]]\+/", "/g; s/^/"/; s/$/"/') @@ -26,7 +26,7 @@ EOF } -[ "$wg_service" = ON ] && grep -q '"wireguard"' "$CRASHDIR"/jsons/endpoints.json && { +[ "$wg_service" = ON ] && grep -q '"wireguard"' "$CRASHDIR"/jsons/endpoints.json 2>/dev/null && { [ -n "$wg_ipv6" ] && wg_ipv6_add=", \"$wg_ipv6\"" cat >"$TMPDIR"/jsons/wireguard.json </dev/null + killall CrashCore 2>/dev/null #清理缓存目录 rm -rf "$TMPDIR"/CrashCore ;;