Expose RUNASUSER to init.d scripts

Remove hardcoded nodepool user from our init.d scripts. Sadly, we
cannot do this with systemd (that I know of).

Change-Id: Ia284b3dc3b39633b4b484d047a1f0c2f6fc0b512
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2016-10-10 09:30:15 -04:00
parent e381ef2e68
commit e7df808c30
8 changed files with 16 additions and 4 deletions

View File

@ -9,4 +9,7 @@ PREFIX=/usr/local
# Options to pass to nodepoold.
ARGS="-l /etc/nodepool/logging.conf --no-builder --no-deletes --no-launches"
# The user used to nodepool service.
RUNASUSER=nodepool
DIB_IMAGE_CACHE=/opt/nodepool/cache

View File

@ -9,4 +9,7 @@ PREFIX=/usr/local
# Options to pass to nodepool-builder.
ARGS="-l /etc/nodepool/builder-logging.conf"
# The user used to nodepool-builder service.
RUNASUSER=nodepool
DIB_IMAGE_CACHE=/opt/nodepool/cache

View File

@ -9,4 +9,7 @@ PREFIX=/usr/local
# Options to pass to nodepool-deleter.
ARGS="-l /etc/nodepool/deleter-logging.conf --no-builder --no-images --no-launches --no-webapp"
# The user used to nodepool-deleter service.
RUNASUSER=nodepool
DIB_IMAGE_CACHE=/opt/nodepool/cache

View File

@ -9,4 +9,7 @@ PREFIX=/usr/local
# Options to pass to nodepool-launcher.
ARGS="-l /etc/nodepool/launcher-logging.conf --no-builder --no-deletes --no-images --no-webapp"
# The user used to nodepool-launcher service.
RUNASUSER=nodepool
DIB_IMAGE_CACHE=/opt/nodepool/cache

View File

@ -15,12 +15,12 @@ DESC="Nodepool"
NAME=nodepool
PIDFILE=/var/run/$NAME/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
USER=nodepool
# Read configuration variable file if it is present
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
DAEMON=$PREFIX/bin/nodepoold
USER=${RUNASUSER:-nodepool}
# Exit if the package is not installed
if ! [ -x "$DAEMON" ]; then

View File

@ -15,12 +15,12 @@ DESC="Nodepool Builder"
NAME=nodepool-builder
PIDFILE=/var/run/$NAME/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
USER=nodepool
# Read configuration variable file if it is present
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
DAEMON=$PREFIX/bin/nodepool-builder
USER=${RUNASUSER:-nodepool}
# Exit if the package is not installed
if ! [ -x "$DAEMON" ]; then

View File

@ -15,12 +15,12 @@ DESC="Nodepool Deleter"
NAME=nodepool-deleter
PIDFILE=/var/run/$NAME/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
USER=nodepool
# Read configuration variable file if it is present
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
DAEMON=$PREFIX/bin/nodepoold
USER=${RUNASUSER:-nodepool}
# Exit if the package is not installed
if ! [ -x "$DAEMON" ]; then

View File

@ -15,12 +15,12 @@ DESC="Nodepool Launcher"
NAME=nodepool-launcher
PIDFILE=/var/run/$NAME/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
USER=nodepool
# Read configuration variable file if it is present
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
DAEMON=$PREFIX/bin/nodepoold
USER=${RUNASUSER:-nodepool}
# Exit if the package is not installed
if ! [ -x "$DAEMON" ]; then