summaryrefslogtreecommitdiff
path: root/community/courier-authlib/authdaemond.rc.d
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-01-09 23:14:46 +0000
committerroot <root@rshg054.dnsready.net>2012-01-09 23:14:46 +0000
commitfdcaf644692e151ddc596b148465ce4a77e6b670 (patch)
treef462377d189cdc42041c78bf22402fec369a48c4 /community/courier-authlib/authdaemond.rc.d
parent7a3611f5caa5e34c1f2b582640f97b733110ae63 (diff)
Mon Jan 9 23:14:46 UTC 2012
Diffstat (limited to 'community/courier-authlib/authdaemond.rc.d')
-rw-r--r--community/courier-authlib/authdaemond.rc.d13
1 files changed, 9 insertions, 4 deletions
diff --git a/community/courier-authlib/authdaemond.rc.d b/community/courier-authlib/authdaemond.rc.d
index ff4abb182..791c3d122 100644
--- a/community/courier-authlib/authdaemond.rc.d
+++ b/community/courier-authlib/authdaemond.rc.d
@@ -4,12 +4,14 @@
. /etc/rc.d/functions
start() {
+ [ -d /var/run/authdaemon ] || mkdir -p /var/run/authdaemon
+ chown courier:courier /var/run/authdaemon
+
stat_busy "Starting Authdaemond"
/usr/sbin/authdaemond start &> /dev/null
if [ $? -gt 0 ]; then
stat_fail
else
- ln -s /var/spool/authdaemon/pid /var/run/authdaemond.pid
add_daemon authdaemond
stat_done
fi
@@ -21,10 +23,13 @@ stop() {
if [ $? -gt 0 ]; then
stat_fail
else
- rm -f /var/run/authdaemond.pid
- rm_daemon authdaemond
- # housecleaning; just like kids'n toys - don't care when it's needed anymore
+ rm -f /var/run/authdaemon/{pid.lock,pid,socket} &> /dev/null
+
+ # TODO: Take these out at some point, they're only cleanup for old way
+ rm -f /var/run/authdaemond.pid &> /dev/null
rm -f /var/spool/authdaemon/{pid.lock,pid,socket} &> /dev/null
+
+ rm_daemon authdaemond
stat_done
fi
}