From 8b860ab407d3b1ea3b536d7abd4741d3ade65008 Mon Sep 17 00:00:00 2001 From: Scott Duensing Date: Wed, 18 Jan 2023 20:56:51 -0600 Subject: [PATCH] Show error if "server" is run non-root. --- joeybuild.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/joeybuild.sh b/joeybuild.sh index 27c9319..aec5760 100755 --- a/joeybuild.sh +++ b/joeybuild.sh @@ -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