From 2c2284618f29ebf3bf854102a57b23dd615ff2aa Mon Sep 17 00:00:00 2001 From: lastpingu <54551308+lazypwny751@users.noreply.github.com> Date: Sat, 20 Mar 2021 02:42:27 +0300 Subject: [PATCH] update check root --- bchacktool.sh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/bchacktool.sh b/bchacktool.sh index 449a535..b93317f 100644 --- a/bchacktool.sh +++ b/bchacktool.sh @@ -33,12 +33,9 @@ if [[ $1 =~ ^(-h|--help|-y|--yardım) ]] ; then echo -e "$cyan Developper $white : $red https://github.com/lazypwny751$tp" exit 0 fi -if [[ $USER = "root" ]] ; then - echo "ok" &> /dev/null -else - echo -e "$red sudo bash bchacktool.sh${tp} İle Deneyiniz.!" - exit 1 -fi + +[ $UID != 0 ] && { echo -e "${red}Lütfen${tp} '${blue}sudo bash $0${tp}'${tp} olarak tekrar çalıştırınız${red}" ; exit 1 ; } + if [[ $1 =~ ^(-v|--version) ]] ; then echo "$version" elif [[ $1 =~ ^(-s|--sil) ]] ; then