mirror of
https://github.com/myvesta/vesta
synced 2025-08-19 21:04:07 -07:00
check if user is root in v-make-separated-ip-for-email
This commit is contained in:
parent
2d8931e908
commit
dd9f963b6f
1 changed files with 6 additions and 0 deletions
|
@ -9,6 +9,12 @@
|
||||||
# Variable&Function #
|
# Variable&Function #
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
|
||||||
|
whoami=$(whoami)
|
||||||
|
if [ "$whoami" != "root" ]; then
|
||||||
|
echo "You must be root to execute this script"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# Importing system environment
|
# Importing system environment
|
||||||
source /etc/profile
|
source /etc/profile
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue