linamh/net-mail/courier-imap/files/authdaemond-3.0.4-r1
geos_one 7e01892a92 add imap
git-svn-id: https://svn.disconnected-by-peer.at/svn/linamh/trunk/linamh@1183 6952d904-891a-0410-993b-d76249ca496b
2009-05-01 13:03:18 +00:00

43 lines
1.0 KiB
Plaintext

#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-mail/courier-imap/files/authdaemond-3.0.4-r1,v 1.3 2004/08/22 23:52:08 robbat2 Exp $
depend() {
need net
}
checkconfig() {
if [ ! -e /etc/courier-imap/authdaemonrc ] ; then
eerror "You need an /etc/courier-imap/authdaemonrc file to run authdaemon"
return 1
fi
}
setauth() {
source /etc/courier-imap/authdaemonrc
AUTHLIB="/usr/lib/courier-imap/authlib"
source /etc/courier-imap/authdaemond.conf
[ -z "$version" ] && version="${AUTHDAEMOND}"
pidfile="/var/run/authdaemon.pid"
logger="/usr/lib/courier-imap/courierlogger"
}
start() {
checkconfig || return 1
setauth
ebegin "Starting ${AUTHDAEMOND}"
start-stop-daemon --quiet --start --pidfile "$pidfile" --exec \
/usr/bin/env -- - $logger -pid="$pidfile" -start "${AUTHLIB}/${AUTHDAEMOND}"
eend $?
}
stop() {
setauth
ebegin "Stopping ${AUTHDAEMOND}"
start-stop-daemon --quiet --stop \
--pidfile "$pidfile"
eend $?
}