summaryrefslogtreecommitdiff
path: root/debian/echolot.init
diff options
context:
space:
mode:
Diffstat (limited to 'debian/echolot.init')
-rwxr-xr-xdebian/echolot.init24
1 files changed, 16 insertions, 8 deletions
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)