#!/sbin/runscript # Copyright 1999-2004 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-initd,v 1.4 2005/02/05 02:55:32 swtaylor 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 } start() { checkconfig || return 1 ebegin "Starting courier-authlib: ${AUTHDAEMOND}" if [[ -x "${LOGGER}" ]]; then start-stop-daemon --quiet --start --pidfile "$PIDFILE" --exec \ "$LOGGER" -- -pid="$PIDFILE" -start "${AUTHLIB}/${AUTHDAEMOND}" else start-stop-daemon --quiet --start --pidfile "$PIDFILE" --make-pidfile --background --exec "${AUTHLIB}/${AUTHDAEMOND}" fi eend $? } stop() { ebegin "Stopping courier-authlib: ${AUTHDAEMOND}" start-stop-daemon --quiet --stop --pidfile "$PIDFILE" eend $? }