From dfbb2c0ba38bf7edb8fa55f27da48ca3171ac297 Mon Sep 17 00:00:00 2001 From: age Date: Tue, 19 Dec 2006 22:33:02 +0000 Subject: [PATCH] startup hint --- debian/cryptobox-server.init | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/debian/cryptobox-server.init b/debian/cryptobox-server.init index 61ea318..812c627 100644 --- a/debian/cryptobox-server.init +++ b/debian/cryptobox-server.init @@ -16,6 +16,9 @@ # Short-Description: start CryptoBox webserver ### END INIT INFO +# include some useful functions to unify our output format +. /lib/lsb/init-functions + # read the default setting file, if it exists [ -r /etc/default/cryptobox-server ] && . /etc/default/cryptobox-server @@ -28,9 +31,6 @@ LOGFILE=/var/log/cryptobox-server/webserver.log SERVER_OPTS=${SERVER_OPTS:-} CONF_FILE=/etc/cryptobox-server/cryptobox.conf -# quit if NO_START is 1 (see /etc/default/cryptobox-server) -[ "$NO_START" = "1" ] && exit 0 - DAEMON=/usr/sbin/CryptoBoxWebserver # default install location is /usr/bin/ - debian installation requires /usr/sbin/ test -x "$DAEMON" || DAEMON=/usr/bin/CryptoBoxWebserver @@ -39,11 +39,12 @@ PIDFILE=/var/run/cryptobox-server/webserver.pid DESC="CryptoBox Daemon (webinterface)" OPTIONS="-B --pidfile=$PIDFILE --config=$CONF_FILE --logfile=$LOGFILE --host=$HOST --port=$PORT --user=$RUNAS $SERVER_OPTS" +# quit if NO_START is 1 (see /etc/default/cryptobox-server) +[ "$NO_START" = "1" ] && log_daemon_msg "Not starting $DESC please edit /etc/default/cryptobox-server!" && exit 0 + # check if the package is installed test -e "$DAEMON" || exit 0 -# include some useful functions to unify our output format -. /lib/lsb/init-functions case "$1" in start ) @@ -64,7 +65,7 @@ case "$1" in fi ;; stop ) - log_daemon_msg "Stopping cryptobox webserver" "$DESC" + log_daemon_msg "Stopping $DESC" # if there is no pid file for some reason, then we try to find the process if test ! -e "$PIDFILE" then if start-stop-daemon --quiet --stop --user "$RUNAS" --exec "$PYTHON_EXEC"