From dd9f963b6fd5017ec1739d667b66bfe4c4d63758 Mon Sep 17 00:00:00 2001 From: myvesta <38690722+myvesta@users.noreply.github.com> Date: Sun, 2 Aug 2020 01:47:00 +0200 Subject: [PATCH] check if user is root in v-make-separated-ip-for-email --- bin/v-make-separated-ip-for-email | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bin/v-make-separated-ip-for-email b/bin/v-make-separated-ip-for-email index 5fa9ee3ee..8e6f8d485 100644 --- a/bin/v-make-separated-ip-for-email +++ b/bin/v-make-separated-ip-for-email @@ -9,6 +9,12 @@ # Variable&Function # #----------------------------------------------------------# +whoami=$(whoami) +if [ "$whoami" != "root" ]; then + echo "You must be root to execute this script" + exit 1 +fi + # Importing system environment source /etc/profile