Imported Debian patch 0.59.3-1
[hcoop/debian/courier-authlib.git] / debian / courier-authdaemon.init
CommitLineData
426e7833 1#! /bin/sh -e
2
3prefix="/usr"
4exec_prefix=${prefix}
5sysconfdir="/etc/courier"
6sbindir="${exec_prefix}/sbin"
7daemonscript="${sbindir}/authdaemond"
8
9. /lib/lsb/init-functions
10
11# Check for a leftover init script
12if [ ! -x $daemonscript ]; then
13 exit 0
14fi
15
16case "$1" in
17start)
18 # Start daemon.
19 cd /
20 log_daemon_msg "Starting Courier authentication services" "authdaemond"
21 $daemonscript start
22 log_end_msg 0
23 ;;
24stop)
25 # Stop daemon.
26 cd /
27 log_daemon_msg "Stopping Courier authentication services" "authdaemond"
28 $daemonscript stop
29 log_end_msg 0
30 ;;
31restart|reload|force-reload)
32 $0 stop
33 $0 start
34 ;;
35*)
36 echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2
37 exit 2
38 ;;
39esac
40exit 0