mirror of
https://github.com/myvesta/vesta
synced 2025-07-05 20:41:53 -07:00
check if user is root in v-update-host-certificate
This commit is contained in:
parent
e48d42617d
commit
62b0d755ad
1 changed files with 3 additions and 4 deletions
|
@ -11,12 +11,11 @@
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
|
||||||
whoami=$(whoami)
|
whoami=$(whoami)
|
||||||
if [ "$whoami" != "root" ] && [ "$whoami" != "admin" ] ; then
|
if [ "$whoami" != "root" ]; then
|
||||||
echo "You must be root or admin to execute this script";
|
echo "You must be root to execute this script"
|
||||||
exit 1;
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Argument definition
|
# Argument definition
|
||||||
user=$1
|
user=$1
|
||||||
hostname=$2
|
hostname=$2
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue