3
# GeneWeb Start the Gwsetup mini HTTP server.
7
# Required-Start: $network $local_fs $remote_fs geneweb
9
# Required-Stop: $remote_fs
10
# Default-Start: 2 3 4 5
13
# Short-Description: Geneweb setup web interface
16
# Do not change the values below
17
GENEWEBSHARE=/usr/share/geneweb
18
GENEWEBDB=/var/lib/geneweb
20
DAEMON=/usr/bin/gwsetup
21
WRAPPER=/usr/lib/geneweb/gwsetup.wrapper
23
LOGFILE=/var/log/$NAME.log
26
# The port which the daemon listens to
28
# The default language
30
# Run Mode : if anything else than "daemon", no daemon will be
31
# launched automatically
36
# Reads geneweb config file (for language)
37
[ -r /etc/default/geneweb ] && . /etc/default/geneweb
39
# Reads gwsetup config file (for other settings)
40
[ -r /etc/default/gwsetup ] && . /etc/default/gwsetup
42
# Export variables so that they may be used by the wrapper script
43
export LNG GWSETUP_PORT LOGFILE NAME DAEMON GENEWEBDB GENEWEBDOC GENEWEBSHARE OPTIONS
47
test -f $DAEMON || exit 0
49
. /lib/lsb/init-functions
51
# We start (or stop) the daemon only when configured
52
# for running in daemon mode
53
if [ "$RUN_MODE" != "Always on" ]; then
61
log_begin_msg "Starting gwsetup server" "gwsetup"
62
if ! start-stop-daemon -b --start --quiet --chuid $GENEWEBUSER --exec $WRAPPER; then
70
log_begin_msg "Stopping gwsetup server" "gwsetup"
71
start-stop-daemon --stop --quiet --exec $DAEMON -- \
72
-gd$GENEWEBSHARE -only /etc/geneweb \
77
restart | force-reload)
84
log_success_msg "Usage: /etc/init.d/$NAME {start|stop|restart|force-reload}"