summaryrefslogtreecommitdiffstats
path: root/vespabase
diff options
context:
space:
mode:
authorArne Juul <arnej@yahoo-inc.com>2017-07-19 10:04:14 +0000
committerArne Juul <arnej@yahoo-inc.com>2017-07-25 14:44:53 +0000
commitcca12ccd22ce7e55055965165609a8844d3e7136 (patch)
tree962453b3d4a1f48a1cad95ccf180862d1e05492b /vespabase
parent19b2fd525e1a297180d03e505f180ffbbf9ec798 (diff)
neutral default for VESPA_USER
Diffstat (limited to 'vespabase')
-rwxr-xr-xvespabase/src/common-env.sh6
-rwxr-xr-xvespabase/src/rhel-prestart.sh4
2 files changed, 6 insertions, 4 deletions
diff --git a/vespabase/src/common-env.sh b/vespabase/src/common-env.sh
index 39107ae5500..8cd296b61c2 100755
--- a/vespabase/src/common-env.sh
+++ b/vespabase/src/common-env.sh
@@ -100,10 +100,10 @@ populate_environment () {
read_conf_file
consider_fallback ROOT ${VESPA_HOME%/}
- if id yahoo >/dev/null 2>&1 ; then
- consider_fallback VESPA_USER "yahoo"
- elif id vespa >/dev/null 2>&1 ; then
+ if id vespa >/dev/null 2>&1 ; then
consider_fallback VESPA_USER "vespa"
+ elif id nobody >/dev/null 2>&1 ; then
+ consider_fallback VESPA_USER "nobody"
fi
}
diff --git a/vespabase/src/rhel-prestart.sh b/vespabase/src/rhel-prestart.sh
index b617516d61e..b6444c37548 100755
--- a/vespabase/src/rhel-prestart.sh
+++ b/vespabase/src/rhel-prestart.sh
@@ -59,7 +59,9 @@ findroot
# END environment bootstrap section
[ "$VESPA_HOME" ] || { echo "Missing VESPA_HOME variable" 1>&2; exit 1; }
-[ "$VESPA_USER" ] || { echo "Missing VESPA_USER variable" 1>&2; exit 1; }
+if [ "$VESPA_USER" = "" ]; then
+ VESPA_USER=$(id -run)
+fi
cd $VESPA_HOME || { echo "Cannot cd to $VESPA_HOME" 1>&2; exit 1; }