Add PREFIX to nodepool service

Since it is possible for the services to be installed into a
virtualenv, expose a way for the user to configure that.

Change-Id: Icf6fc9fe9f755d769f8bf8bdbf3526e61443ae71
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2016-08-31 10:51:54 -04:00
parent 2658537bb4
commit 47fd648b62
No known key found for this signature in database
GPG Key ID: 611A80832067AF38
8 changed files with 28 additions and 10 deletions

View File

@ -2,4 +2,8 @@
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
#
# The prefix used when nodepool was installed. Be sure to update this value
# if you are using a virtualenv.
PREFIX=/usr
DIB_IMAGE_CACHE=/opt/nodepool/cache

View File

@ -2,4 +2,8 @@
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
#
# The prefix used when nodepool-builder was installed. Be sure to update this
# value if you are using a virtualenv.
PREFIX=/usr
DIB_IMAGE_CACHE=/opt/nodepool/cache

View File

@ -13,17 +13,18 @@
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin
DESC="Nodepool"
NAME=nodepool
DAEMON=/usr/local/bin/nodepoold
PIDFILE=/var/run/$NAME/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
USER=nodepool
# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0
# Read configuration variable file if it is present
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
DAEMON=$PREFIX/bin/nodepoold
# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0
# Load the VERBOSE setting and other rcS variables
. /lib/init/vars.sh

View File

@ -13,17 +13,18 @@
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin
DESC="Nodepool Builder"
NAME=nodepool-builder
DAEMON=/usr/local/bin/nodepool-builder
PIDFILE=/var/run/$NAME/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
USER=nodepool
# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0
# Read configuration variable file if it is present
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
DAEMON=$PREFIX/bin/nodepool-builder
# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0
# Load the VERBOSE setting and other rcS variables
. /lib/init/vars.sh

View File

@ -2,4 +2,8 @@
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
#
# The prefix used when nodepool was installed. Be sure to update this value
# if you are using a virtualenv.
PREFIX=/usr
DIB_IMAGE_CACHE=/opt/nodepool/cache

View File

@ -2,4 +2,8 @@
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
#
# The prefix used when nodepool-builder was installed. Be sure to update this
# value if you are using a virtualenv.
PREFIX=/usr
DIB_IMAGE_CACHE=/opt/nodepool/cache

View File

@ -7,7 +7,7 @@ Type=simple
User=nodepool
Group=nodepool
EnvironmentFile=-/etc/sysconfig/nodepool-builder
ExecStart=/usr/bin/nodepool-builder -d -l /etc/nodepool/logging.conf
ExecStart=/bin/sh -c "${PREFIX}/bin/nodepool-builder -d -l /etc/nodepool/logging.conf"
[Install]
WantedBy=multi-user.target

View File

@ -7,7 +7,7 @@ Type=simple
User=nodepool
Group=nodepool
EnvironmentFile=-/etc/sysconfig/nodepool
ExecStart=/usr/bin/nodepoold --no-builder -d -l /etc/nodepool/logging.conf
ExecStart=/bin/sh -c "${PREFIX}/bin/nodepoold --no-builder -d -l /etc/nodepool/logging.conf"
[Install]
WantedBy=multi-user.target