Rev 3 | Blame | Compare with Previous | Last modification | View Log | RSS feed
#!/bin/sh#### BEGIN INIT INFO# Provides: prayer-accountd# Required-Start:# Required-Stop:# Should-Start: $local_fs# Should-Stop: $local_fs# Default-Start: 2 3 4 5# Default-Stop: 0 1 6# Short-Description: Prayer account helper daemon# Description: Lets users change passwords, manage filters and other things not supported by IMAP itself### END INIT INFOPATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/binDAEMON=/usr/sbin/prayer-accountdPIDFILE=/var/run/prayer-accountd.pidDESC="Prayer account helper server"test -x $DAEMON || exit 0egrep -iq "^[[:space:]]*accountd_port[[:space:]]*=[[:space:]]*[[:digit:]]+[[:space:]]*$" /etc/prayer/accountd.cf || exit 0. /lib/lsb/init-functions# Include prayer defaults if availableif [ -f /etc/default/prayer-accountd ] ; then. /etc/default/prayer-accountdfiset +estart() {log_daemon_msg "Starting $DESC" "accountd"start-stop-daemon --start --background --make-pidfile --pidfile $PIDFILE \--exec $DAEMON -- $DAEMON_OPTSlog_end_msg $?}stop() {log_daemon_msg "Stopping $DESC"if [ -f "$PIDFILE" ]; thenstart-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILElog_progress_msg "accountd"firm -f "$PIDFILE"log_end_msg 0}case "$1" instart)start;;stop)stop;;restart|force-reload)stopstart;;*)N=/etc/init.d/prayer-accountd# echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2log_failure_msg "Usage: $N {start|stop|restart|force-reload}" >&2exit 1;;esacexit 0