From bb672929c90b92cc5733e43b92bf80360f58f158 Mon Sep 17 00:00:00 2001 From: Harald Pfeiffer Date: Wed, 25 Nov 2015 20:12:00 +0100 Subject: SYSVDEFAULTS --- README.md | 1 + init.d/infinoted | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3b36d58..c6b8531 100644 --- a/README.md +++ b/README.md @@ -17,3 +17,4 @@ Installation Just type "make help". The alternative: Copy init.d/infinoted to your SysVinit core script directory, default/infinoted to wherever your distro stores default variable scripts. +Don't forget to change the SYSVDEFAULTS variable in the init script (yep, because without SYSVDEFAULTS the script won't know whence to load the variables (: ) diff --git a/init.d/infinoted b/init.d/infinoted index d416d34..5c02c8e 100755 --- a/init.d/infinoted +++ b/init.d/infinoted @@ -35,6 +35,7 @@ PATH=/sbin:/usr/sbin:/bin:/usr/bin DESC="Infinoted, a server for collaborative editing" NAME=infinoted DAEMON=/usr/bin/$NAME +SYSVDEFAULTS=/etc/default # hp -- We are now presenting some defaults here, will be overwritten if present in /etc/default/$NAME INFINOTE_ROOT="/usr/local/share/infinoted" INFINOTE_CERT="/etc/infinoted/cert.pem" @@ -56,7 +57,7 @@ SCRIPTUSER="infinote:infinote" [ -x "$DAEMON" ] || exit 0 # Read configuration variable file if it is present -[ -r /etc/default/$NAME ] && . /etc/default/$NAME +[ -r $SYSVDEFAULTS/$NAME ] && . $SYSVDEFAULTS/$NAME DAEMON_ARGS="-d -c $INFINOTE_CERT -k $INFINOTE_KEY -p $INFINOTE_PORT -r $INFINOTE_ROOT" # Load the VERBOSE setting and other rcS variables -- cgit v1.2.3