startup hint
This commit is contained in:
parent
61562c9eec
commit
dfbb2c0ba3
1 changed files with 7 additions and 6 deletions
13
debian/cryptobox-server.init
vendored
13
debian/cryptobox-server.init
vendored
|
@ -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"
|
||||
|
|
Loading…
Add table
Reference in a new issue