4 # Provides: courier-authdaemon
5 # Required-Start: $remote_fs $syslog
6 # Required-Stop: $remote_fs $syslog
7 # Default-Start: 2 3 4 5
13 sysconfdir
="/etc/courier"
14 sbindir
="${exec_prefix}/sbin"
15 daemonscript
="${sbindir}/authdaemond"
16 rundir_courier
="/var/run/courier"
17 rundir
="/var/run/courier/authdaemon"
18 pidfile
="${rundir}/pid"
20 .
/lib
/lsb
/init-functions
22 # Check for a leftover init script
23 if [ ! -x $daemonscript ]; then
31 log_daemon_msg
"Starting Courier authentication services" "authdaemond"
32 if [ ! -d "$rundir_courier" ]; then
33 mkdir
-m 0775 $rundir_courier
34 chown daemon
:daemon
$rundir_courier
35 # set file context for SELinux (#668564)
36 [ -x /sbin
/restorecon
] && /sbin
/restorecon
$rundir_courier
38 if [ ! -d "$rundir" ]; then
40 chown daemon
:daemon
$rundir
41 # set file context for SELinux (#668564)
42 [ -x /sbin
/restorecon
] && /sbin
/restorecon
$rundir
50 log_daemon_msg
"Stopping Courier authentication services" "authdaemond"
59 status_of_proc
-p "$pidfile" "" "authdaemond" && exit 0 ||
exit $?
62 echo "Usage: $0 {start|stop|restart|force-reload|status}" >&2