3 # Provides: yaid ident-server
4 # Required-Start: $remote_fs $syslog
5 # Required-Stop: $remote_fs $syslog
6 # Default-Start: 2 3 4 5
8 # Short-Description: Yet another ident daemon
9 # Description: This file starts and stops YAID
12 PATH=/sbin:/usr/sbin:/bin:/usr/bin
13 DESC="Yet another ident daemon"
15 DAEMON=/usr/sbin/$NAME
16 PIDFILE=/var/run/$NAME.pid
17 DAEMON_ARGS="-Dl -P$PIDFILE -Unobody -Gnogroup"
18 SCRIPTNAME=/etc/init.d/$NAME
20 [ -x "$DAEMON" ] || exit 0
22 [ -r /etc/default/$NAME ] && . /etc/default/$NAME
25 . /lib/lsb/init-functions
29 start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
31 start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
38 start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
40 [ "$RETVAL" = 2 ] && return 2
41 start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
42 [ "$?" = 2 ] && return 2
49 [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
52 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
53 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
57 [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
60 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
61 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
65 status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
68 log_daemon_msg "Restarting $DESC" "$NAME"
75 1) log_end_msg 1 ;; # Old process is still running
76 *) log_end_msg 1 ;; # Failed to start
86 echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2