Commit a874c994 authored by 张三's avatar 张三

Replace tun.sh

parent e8ad8c31
...@@ -53,10 +53,7 @@ check_tun () { ...@@ -53,10 +53,7 @@ check_tun () {
} }
check_sudo () { 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 [ -z "$SUDO_USER" ]; then
# if the user didn't call us with sudo, re-execute # if the user didn't call us with sudo, re-execute
exec sudo $0 "$MODE" "$@" exec sudo $0 "$MODE" "$@"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment