From a874c994f7078cbe25af2a2163da11bd5f3bfc97 Mon Sep 17 00:00:00 2001 From: zhangshengqi Date: Wed, 1 Dec 2021 15:22:15 +0800 Subject: [PATCH] Replace tun.sh --- tun.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tun.sh b/tun.sh index 0c46eb5..8528036 100644 --- a/tun.sh +++ b/tun.sh @@ -53,10 +53,7 @@ check_tun () { } check_sudo () { - if [ "$SUDO_USER" = "root" ]; then - echo "please execute this script as a regular user, not as root" - exit 1 - fi + if [ -z "$SUDO_USER" ]; then # if the user didn't call us with sudo, re-execute exec sudo $0 "$MODE" "$@" -- GitLab