check if user is root

This commit is contained in:
Solene Rapenne 2021-08-15 21:01:50 +02:00
parent 3c1c5d5765
commit 710f1dfef8
1 changed files with 6 additions and 0 deletions

View File

@ -74,6 +74,12 @@ then
exit 1
fi
if [ "$(id -u)" -ne 0 ]
then
echo "You need to run $0 as root"
exit 1
fi
case "$INSTALLURL" in
http://*) do_http "http://"
;;