From a5a75de615b8e131c4be7f3f12c2b293fa997ae3 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Tue, 12 Nov 2002 01:07:05 +0000 Subject: Have Echolot disabled by default in /etc/default/echolot. Add some more comments to README.Debian. Also process pending commands upon pingd startup. --- debian/echolot.init | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'debian/echolot.init') diff --git a/debian/echolot.init b/debian/echolot.init index 3ee6d0b..5276149 100755 --- a/debian/echolot.init +++ b/debian/echolot.init @@ -20,6 +20,10 @@ DESC="Echolot Ping Daemon" NAME="pingd" test -f $DAEMON || exit 0 +# Reads config file (will override defaults above) +[ -r /etc/default/echolot ] && . /etc/default/echolot + + wait_for_deaddaemon () { PID=$1 sleep 3 @@ -97,14 +101,18 @@ start) echo "$PIDFILE." fi fi - echo -n "Starting $DESC: " - start-stop-daemon \ - --start \ - --quiet \ - --pidfile $PIDFILE \ - --chuid $USER:$GROUP \ - --exec $DAEMON -- --detach $VERBOSE --quiet start - echo "$NAME." + if [ $RUN_ECHOLOT -gt 0 ]; then + echo -n "Starting $DESC: " + start-stop-daemon \ + --start \ + --quiet \ + --pidfile $PIDFILE \ + --chuid $USER:$GROUP \ + --exec $DAEMON -- --detach $VERBOSE --process --quiet start + echo "$NAME." + else + echo "Not starting $DESC: disabled in configuration" + fi ;; stop) -- cgit v1.2.3