Skip to content

Commit ec35ece

Browse files
committed
switched back to the previous sudo check
1 parent 2cc26cd commit ec35ece

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

fullsysbackup.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ backuppaths=(
1818
###### End Of Configuration ######
1919

2020
# sudo is required
21-
printf "\e[1mThis script needs sudo privileges. You will also be promped to enter mysql credentials for each database you export unless you have a .my.cnf file in place. See README.md file for more information.\e[0m\n"
22-
if [ $EUID != 0 ]; then
23-
sudo "$0" "$@"
24-
exit $?
21+
if [[ $UID != 0 ]]; then
22+
printf "\e[1mThis script needs sudo privileges. You will also be promped to enter mysql credentials for each database you export unless you have a .my.cnf file in place. See README.md file for more information.\e[0m\n"
23+
printf "sudo $0 $*"
24+
exit 1
2525
fi
2626

2727
printf "%b" "\e[1mChecking for required package: pv\e[0m\n"

0 commit comments

Comments
 (0)