updated sysv file to provide the python_path environment variable when not already present

This commit is contained in:
Blake J. Harnden 2018-04-11 09:57:02 -07:00
parent b9ce2ef4dd
commit 2662a36f09
2 changed files with 7 additions and 6 deletions

View file

@ -141,6 +141,7 @@ define change-files =
$(info creating file $1 from $1.in)
@$(SED) -e 's,[@]sbindir[@],$(sbindir),g' \
-e 's,[@]bindir[@],$(bindir),g' \
-e 's,[@]pythondir[@],$(pythondir),g' \
-e 's,[@]PYTHON[@],$(PYTHON),g' \
-e 's,[@]PACKAGE_VERSION[@],$(PACKAGE_VERSION),g' \
-e 's,[@]PACKAGE_DATE[@],$(PACKAGE_DATE),g' \

View file

@ -20,7 +20,7 @@
NAME=`basename $0`
PIDFILE="@CORE_STATE_DIR@/run/$NAME.pid"
LOG="@CORE_STATE_DIR@/log/$NAME.log"
CMD="@PYTHON@ @bindir@/$NAME"
CMD="PYTHON_PATH=@pythondir@ @PYTHON@ @bindir@/$NAME"
get_pid() {
cat "$PIDFILE"
@ -43,7 +43,7 @@ corestart() {
echo "unable to start $NAME, see $LOG"
exit 1
fi
}
}
corestop() {
if is_alive; then
@ -57,7 +57,7 @@ corestop() {
echo -n "."
done
echo
if is_alive; then
echo "not stopped; may still be shutting down"
exit 1
@ -70,12 +70,12 @@ corestop() {
else
echo "$NAME not running"
fi
}
}
corerestart() {
corestop
corestart
}
}
corestatus() {
if is_alive; then
@ -84,7 +84,7 @@ corestatus() {
echo "$NAME is stopped"
exit 1
fi
}
}
case "$1" in