From 59c5ff7412ad00844f9caba79424b2c67a08f477 Mon Sep 17 00:00:00 2001 From: myvesta <38690722+myvesta@users.noreply.github.com> Date: Sun, 2 Aug 2020 01:48:13 +0200 Subject: [PATCH] check if user is root in v-install-wordpress --- bin/v-install-wordpress | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bin/v-install-wordpress b/bin/v-install-wordpress index b5578dc9..8e60dc6f 100644 --- a/bin/v-install-wordpress +++ b/bin/v-install-wordpress @@ -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