Show error if "server" is run non-root.
This commit is contained in:
parent
d861b38bba
commit
8b860ab407
1 changed files with 4 additions and 0 deletions
|
@ -291,6 +291,10 @@ function startup() {
|
|||
# We're running as root, so use specified G_EHOME.
|
||||
G_EHOME="$(getent passwd ${2} | cut -d: -f6)"
|
||||
else
|
||||
if [[ "${ACTION}" == "server" ]]; then
|
||||
echo "The \"server\" option must be run as root."
|
||||
exit 1
|
||||
fi
|
||||
# Not root, use standard G_EHOME.
|
||||
G_EHOME="$(getent passwd ${USER} | cut -d: -f6)"
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue