commit 548c638b5197aaa5567aa21abbb270525eb5aa39
parent 8b57197da7384e0cb5cf8c54cab688471412a222
Author: Morel BĂ©renger <berengermorel76@gmail.com>
Date: Mon, 16 Nov 2020 11:51:33 +0100
add ldap src/cli files
Diffstat:
7 files changed, 36 insertions(+), 0 deletions(-)
diff --git a/templates/generic/packages/ldap.cli.list.nope b/templates/generic/packages/ldap.cli.list.nope
@@ -0,0 +1 @@
+libnss-ldapd,libpam-ldapd,ldap-utils,
diff --git a/templates/generic/packages/ldap.srv.list.nope b/templates/generic/packages/ldap.srv.list.nope
@@ -0,0 +1 @@
+ldap-utils,slapd,
diff --git a/templates/generic/root/etc/runit/common b/templates/generic/root/etc/runit/common
@@ -8,6 +8,20 @@ badconf()
exit 1
}
+rundir()
+{
+ RUNDIR="${1:?"RUNDIR not provided"}"
+ shift
+ USER="${1:-"$SVNAME"}"
+ GROUP="${2:-"$SVNAME"}"
+
+ if test ! -d "/run/$RUNDIR"
+ then
+ mkdir "/run/$RUNDIR"
+ chown "$USER:$GROUP" "/run/$RUNDIR"
+ fi
+}
+
set -e
exec 2>&1
diff --git a/templates/generic/root/etc/sv/nslcd/log/run b/templates/generic/root/etc/sv/nslcd/log/run
@@ -0,0 +1 @@
+/etc/runit/log.run+
\ No newline at end of file
diff --git a/templates/generic/root/etc/sv/nslcd/run b/templates/generic/root/etc/sv/nslcd/run
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+. /etc/runit/common
+
+rundir nslcd nslcd nslcd
+
+echo Starting $SVNAME...
+exec nslcd -d
diff --git a/templates/generic/root/etc/sv/slapd/log/run b/templates/generic/root/etc/sv/slapd/log/run
@@ -0,0 +1 @@
+/etc/runit/log.run+
\ No newline at end of file
diff --git a/templates/generic/root/etc/sv/slapd/run b/templates/generic/root/etc/sv/slapd/run
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+. /etc/runit/common
+
+rundir slapd openldap openldap
+
+echo Starting $SVNAME...
+exec slapd -d 0 -g openldap -u openldap