Expose user for service configuration for init.d script

Currently we hardcode the user we use to start services. Allow the
user to decided who to use.

Sadly, we cannot support systemd services at this time. We likely need
to switch to the systemd task or write out own logic. We'll have to
revisting this in the future.

Change-Id: I338d167863509667b935ccc7490d796315bc6153
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2016-09-03 06:13:40 -04:00
parent 485fe51dbd
commit 854ee57989
No known key found for this signature in database
GPG Key ID: 611A80832067AF38
6 changed files with 12 additions and 3 deletions

View File

@ -5,3 +5,6 @@
# The prefix used when zuul-launcher was installed. Be sure to update this value
# if you are using a virtualenv.
PREFIX=/usr/local
# The user used to start zuul-launcher service.
RUNASUSER=zuul

View File

@ -5,3 +5,6 @@
# The prefix used when zuul-merger was installed. Be sure to update this value
# if you are using a virtualenv.
PREFIX=/usr/local
# The user used to start zuul-merger service.
RUNASUSER=zuul

View File

@ -5,3 +5,6 @@
# The prefix used when zuul-server was installed. Be sure to update this value
# if you are using a virtualenv.
PREFIX=/usr/local
# The user used to start zuul-server service.
RUNASUSER=zuul

View File

@ -17,12 +17,12 @@ DESC="Zuul Launcher"
NAME=zuul-launcher
PIDFILE=/var/run/$NAME/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
USER=zuul
# Read configuration variable file if it is present
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
DAEMON=$PREFIX/bin/zuul-launcher
USER=${RUNASUSER:-zuul}
# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 5

View File

@ -17,12 +17,12 @@ DESC="Zuul Merger"
NAME=zuul-merger
PIDFILE=/var/run/$NAME/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
USER=zuul
# Read configuration variable file if it is present
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
DAEMON=$PREFIX/bin/zuul-merger
USER=${RUNASUSER:-zuul}
# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 5

View File

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