#!/bin/sh
#
# ngIRCd start and stop script for Debian-based systems
-# Copyright 2008,2009 Alexander Barton <alex@barton.de>
+# Copyright 2008-2013 Alexander Barton <alex@barton.de>
#
### BEGIN INIT INFO
-# Provides: ngircd ircd
-# Required-Start: $network $local_fs
-# Required-Stop:
+# Provides: ngircd
+# Required-Start: $network $remote_fs
+# Required-Stop: $network $remote_fs
# Should-Start: $syslog $named
# Should-Stop: $syslog
# Default-Start: 2 3 4 5
STARTTIME=1
DIETIME=10
-test -x $DAEMON || exit 5
-
test -h "$0" && me=`readlink $0` || me="$0"
BASENAME=`basename $me`
test -r /etc/default/$BASENAME && . /etc/default/$BASENAME
+test -x $DAEMON || exit 5
+
# LSB compatibility functions that become used if there is no local
# include file available.
log_daemon_msg() {
log_warning_msg "$NAME seems to be already running, nothing to do."
exit 0
fi
+ rm -f "$PIDFILE"
start-stop-daemon --start \
--quiet --exec $DAEMON -- $PARAMS
sleep $STARTTIME