check if user is root in v-update-host-certificate

This commit is contained in:
myvesta 2020-08-02 01:40:26 +02:00 committed by GitHub
parent e48d42617d
commit 62b0d755ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -11,12 +11,11 @@
#----------------------------------------------------------#
whoami=$(whoami)
if [ "$whoami" != "root" ] && [ "$whoami" != "admin" ] ; then
echo "You must be root or admin to execute this script";
exit 1;
if [ "$whoami" != "root" ]; then
echo "You must be root to execute this script"
exit 1
fi
# Argument definition
user=$1
hostname=$2