summaryrefslogtreecommitdiffstats
path: root/vespabase
diff options
context:
space:
mode:
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; }