add aoutlib
git-svn-id: https://svn.disconnected-by-peer.at/svn/linamh/trunk/linamh@1184 6952d904-891a-0410-993b-d76249ca496b
This commit is contained in:
41
net-libs/courier-authlib/files/courier-authlib
Normal file
41
net-libs/courier-authlib/files/courier-authlib
Normal file
@@ -0,0 +1,41 @@
|
||||
#!/sbin/runscript
|
||||
# Copyright 1999-2007 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/net-libs/courier-authlib/files/courier-authlib,v 1.2 2007/04/08 14:10:55 chtekk Exp $
|
||||
|
||||
depend() {
|
||||
need net
|
||||
provide authdaemond
|
||||
}
|
||||
|
||||
checkconfig() {
|
||||
if [[ ! -e /etc/courier/authlib/authdaemonrc ]] ; then
|
||||
eerror "You need an /etc/courier/authlib/authdaemonrc file to run authdaemon"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
setauth() {
|
||||
source /etc/courier/authlib/authdaemonrc
|
||||
AUTHLIB="/usr/lib/courier/courier-authlib"
|
||||
AUTHDAEMOND="authdaemond"
|
||||
pidfile="/var/run/authdaemon.pid"
|
||||
logger="/usr/sbin/courierlogger"
|
||||
export DEBUG_LOGIN DEFAULTOPTIONS LOGGEROPTS
|
||||
}
|
||||
|
||||
start() {
|
||||
checkconfig || return 1
|
||||
setauth
|
||||
ebegin "Starting courier-authlib: ${AUTHDAEMOND}"
|
||||
start-stop-daemon --quiet --start --pidfile "${pidfile}" --exec \
|
||||
/usr/bin/env ${logger} -- ${LOGGEROPTS} -pid="${pidfile}" -start "${AUTHLIB}/${AUTHDAEMOND}"
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
setauth
|
||||
ebegin "Stopping courier-authlib: ${AUTHDAEMOND}"
|
||||
start-stop-daemon --quiet --stop --pidfile "${pidfile}"
|
||||
eend $?
|
||||
}
|
||||
Reference in New Issue
Block a user