summaryrefslogtreecommitdiffstats
path: root/configserver
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@oath.com>2018-03-12 11:29:46 +0000
committerTor Egge <Tor.Egge@oath.com>2018-03-12 11:43:56 +0000
commit410933939a74e42874dd580bfe0051b3222185a5 (patch)
treefcc0b90f8766f6515f395234521e4ff6b269b10a /configserver
parent3a8b891dcd7f394129a7a7ba700bf525126db44f (diff)
Changes to allow unprivileged vespa.
Diffstat (limited to 'configserver')
-rwxr-xr-xconfigserver/src/main/sh/start-configserver8
1 files changed, 6 insertions, 2 deletions
diff --git a/configserver/src/main/sh/start-configserver b/configserver/src/main/sh/start-configserver
index d3c6a17b207..f9ba6a4f56f 100755
--- a/configserver/src/main/sh/start-configserver
+++ b/configserver/src/main/sh/start-configserver
@@ -63,7 +63,9 @@ cd ${VESPA_HOME} || { echo "Cannot cd to ${VESPA_HOME}" 1>&2; exit 1; }
fixfile () {
if [ -f $1 ]; then
if [ "${VESPA_USER}" ]; then
- chown ${VESPA_USER} $1
+ if test "${VESPA_UNPRIVILEGED}" != yes; then
+ chown ${VESPA_USER} $1
+ fi
fi
chmod 644 $1
fi
@@ -75,7 +77,9 @@ fixddir () {
mkdir -p $1 || exit 1
fi
if [ "${VESPA_USER}" ]; then
- chown ${VESPA_USER} $1
+ if test "${VESPA_UNPRIVILEGED}" != yes; then
+ chown ${VESPA_USER} $1
+ fi
fi
chmod 755 $1
}