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