summaryrefslogtreecommitdiff
path: root/net-libs/courier-authlib/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-12-24 14:11:38 +0000
committerV3n3RiX <venerix@redcorelinux.org>2018-12-24 14:11:38 +0000
commitde49812990871e1705b64051c35161d5e6400269 (patch)
tree5e1e8fcb0ff4579dbd22a1bfee28a6b97dc8aaeb /net-libs/courier-authlib/files
parent536c3711867ec947c1738f2c4b96f22e4863322d (diff)
gentoo resync : 24.12.2018
Diffstat (limited to 'net-libs/courier-authlib/files')
-rw-r--r--net-libs/courier-authlib/files/courier-authlib-r240
1 files changed, 40 insertions, 0 deletions
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 $?
+}