summaryrefslogtreecommitdiffstats
path: root/system/nss-pam-ldapd/rc.nss-pam-ldapd
diff options
context:
space:
mode:
author Christopher Walker <kris240376@gmail.com>2012-02-19 18:02:16 -0600
committer Robby Workman <rworkman@slackbuilds.org>2012-02-20 12:20:47 -0600
commit840861ce8814fd32ee5594f526d5dc8af177b668 (patch)
tree8fc5030de2d761a944b444fd8a0007ba7689532d /system/nss-pam-ldapd/rc.nss-pam-ldapd
parentfee47e9d5033c11d11bdb69eb71333890b1e955f (diff)
downloadslackbuilds-840861ce8814fd32ee5594f526d5dc8af177b668.tar.gz
slackbuilds-840861ce8814fd32ee5594f526d5dc8af177b668.tar.xz
system/nss-pam-ldapd: Added (LDAP NSS/PAM module)
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'system/nss-pam-ldapd/rc.nss-pam-ldapd')
-rw-r--r--system/nss-pam-ldapd/rc.nss-pam-ldapd37
1 files changed, 37 insertions, 0 deletions
diff --git a/system/nss-pam-ldapd/rc.nss-pam-ldapd b/system/nss-pam-ldapd/rc.nss-pam-ldapd
new file mode 100644
index 0000000000..0630c0a349
--- /dev/null
+++ b/system/nss-pam-ldapd/rc.nss-pam-ldapd
@@ -0,0 +1,37 @@
+#!/bin/sh
+#
+# rc.nss-pam-ldapd: start/stop/restart nslcd
+#
+# nslcd is a daemon that will do LDAP queries for local processes that want
+# to do user, group, and other naming lookups (NSS), or do user authentication,
+# authorization, or password modification (PAM). slapd is typically invoked
+# at boot time, usually out of /etc/rc.d/rc.local.
+#
+
+nslcd_start() {
+ if [ -x /usr/sbin/nslcd -a -r /etc/nslcd.conf ]; then
+ echo "Starting nslcd name service daemon: /usr/sbin/nslcd"
+ /usr/sbin/nslcd
+ fi
+}
+
+nslcd_stop() {
+ echo "Stopping nslcd name service daemon..."
+ killall nslcd
+}
+
+case "$1" in
+'start')
+ nslcd_start
+ ;;
+'stop')
+ nslcd_stop
+ ;;
+'restart')
+ nslcd_stop
+ sleep 2
+ nslcd_start
+ ;;
+*)
+ echo "usage $0 start|stop|restart"
+esac