mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-24 10:02:29 +01:00
840861ce88
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
37 lines
757 B
Bash
37 lines
757 B
Bash
#!/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
|