check if user is root in v-make-separated-ip-for-email

This commit is contained in:
myvesta 2020-08-02 01:47:00 +02:00 committed by GitHub
commit dd9f963b6f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -9,6 +9,12 @@
# Variable&Function #
#----------------------------------------------------------#
whoami=$(whoami)
if [ "$whoami" != "root" ]; then
echo "You must be root to execute this script"
exit 1
fi
# Importing system environment
source /etc/profile