From 2d8931e90838d5c140f9b24c448f27114c419ea0 Mon Sep 17 00:00:00 2001 From: myvesta <38690722+myvesta@users.noreply.github.com> Date: Sun, 2 Aug 2020 01:46:38 +0200 Subject: [PATCH] check if user is root in v-make-ip-ssl --- bin/v-make-ip-ssl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bin/v-make-ip-ssl b/bin/v-make-ip-ssl index 47e12b9d4..e0e094faa 100644 --- a/bin/v-make-ip-ssl +++ b/bin/v-make-ip-ssl @@ -9,6 +9,12 @@ # Variable&Function # #----------------------------------------------------------# +whoami=$(whoami) +if [ "$whoami" != "root" ]; then + echo "You must be root to execute this script" + exit 1 +fi + # Argument definition user=$1 domain=$2