From 63ba5b8d4ed1a388d66f4de28ccba58e4434fadf Mon Sep 17 00:00:00 2001 From: uselibrary Date: Tue, 14 Jun 2022 12:18:01 +0800 Subject: [PATCH] update authorization --- scripts/install.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/install.sh b/scripts/install.sh index 8564cc17f..dc2f93ec2 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -13,13 +13,18 @@ startTime=`date +%s` _os=`uname` echo "use system: ${_os}" +if [ "$EUID" -ne 0 ] + then echo "Please run as root!" + exit +fi + if grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then - sudo ln -sf /bin/bash /bin/sh + ln -sf /bin/bash /bin/sh #sudo dpkg-reconfigure dash fi if grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then - sudo ln -sf /bin/bash /bin/sh + ln -sf /bin/bash /bin/sh fi