1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
|
#!/bin/sh
# /etc/init.d/solid-pop3
#
# Written by Miquel van Smoorenburg <miquels@drinkel.ow.org>.
# Modified for Debian GNU/Linux by Ian Murdock <imurdock@gnu.ai.mit.edu>.
# Modified for exim by Tim Cutts <timc@chiark.greenend.org.uk>
# Modified for solid-pop3 by Adam D. Barratt <adam-debian@adam-barratt.org.uk>.
### BEGIN INIT INFO
# Provides: solid-pop3d
# Required-Start: $local_fs $remote_fs $syslog $network
# Required-Stop: $local_fs $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start/stop solid-pop3d server
# Description: Solid-pop3d is a POP3 server, which has support for such features as:
# - APOP authentication scheme
# - virtual hosting
# - maildir and mailbox handling
# - bulletins
# - expiration of messages
### END INIT INFO
set -e
OPTS=""
DAEMON=/usr/sbin/solid-pop3d
DESC="virtual pop daemon"
NAME=solid-pop3d
CONFIGFILE=/etc/default/solid-pop3d
[ -x "$DAEMON" ] || exit 0
RUN_MODE="inetd"
[ -r "$CONFIGFILE" ] && . "$CONFIGFILE"
[ "$RUN_MODE" = "daemon" ] || exit 0
. /lib/lsb/init-functions
status=0
case "$1" in
start)
log_daemon_msg "Starting $DESC" "$NAME"
start-stop-daemon --start --quiet --exec $DAEMON -- $OPTS || status=$?
log_end_msg $status
;;
stop)
log_daemon_msg "Stopping $DESC" "$NAME"
start-stop-daemon --stop --quiet --oknodo --retry 30 \
--exec $DAEMON || status=$?
log_end_msg $status
;;
restart|reload|force-reload)
log_daemon_msg "Restarting $DESC" "$NAME"
start-stop-daemon --stop --quiet --oknodo --retry 30 \
--exec $DAEMON
start-stop-daemon --start --quiet --exec $DAEMON -- $OPTS || status=$?
log_end_msg $status
;;
*)
log_failure_msg "Usage: $0 {start|stop|restart|force-reload}"
exit 1
;;
esac
exit $status
|