check if user is root in v-install-unsigned-ssl

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

View file

@ -5,11 +5,16 @@
#
# The function install unsigned SSL to domain
#----------------------------------------------------------#
# Variable&Function #
#----------------------------------------------------------#
whoami=$(whoami)
if [ "$whoami" != "root" ]; then
echo "You must be root to execute this script"
exit 1
fi
# Argument definition
if [ $# -lt 1 ]; then
echo "usage: v-install-unsigned-ssl DOMAIN [RESTART]"