From de49812990871e1705b64051c35161d5e6400269 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 24 Dec 2018 14:11:38 +0000 Subject: gentoo resync : 24.12.2018 --- net-libs/courier-authlib/files/courier-authlib-r2 | 40 +++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 net-libs/courier-authlib/files/courier-authlib-r2 (limited to 'net-libs/courier-authlib/files') diff --git a/net-libs/courier-authlib/files/courier-authlib-r2 b/net-libs/courier-authlib/files/courier-authlib-r2 new file mode 100644 index 000000000000..4d810007cef1 --- /dev/null +++ b/net-libs/courier-authlib/files/courier-authlib-r2 @@ -0,0 +1,40 @@ +#!/sbin/openrc-run +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +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() { + . /etc/courier/authlib/authdaemonrc + AUTHLIB="/usr/libexec/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 $? +} -- cgit v1.2.3