mirror of
git://slackware.nl/current.git
synced 2024-12-30 10:24:23 +01:00
eba2e5b781
Hey folks, just a heads-up that PAM is about to be merged into the main tree. We can't have it blocking other upgrades any longer. The config files could be improved (adding support for pam_krb5 and pam_ldap, for example), but they'll do for now. Have a good weekend, and enjoy these updates! :-) a/aaa_elflibs-15.0-x86_64-23.txz: Rebuilt. Upgraded: libcap.so.2.34, libelf-0.179.so, liblzma.so.5.2.5, libglib-2.0.so.0.6400.2, libgmodule-2.0.so.0.6400.2, libgobject-2.0.so.0.6400.2, libgthread-2.0.so.0.6400.2, liblber-2.4.so.2.10.13, libldap-2.4.so.2.10.13, libpcre2-8.so.0.10.0. Added temporarily in preparation for upgrading icu4c: libicudata.so.65.1, libicui18n.so.65.1, libicuio.so.65.1, libicutest.so.65.1, libicutu.so.65.1, libicuuc.so.65.1. a/etc-15.0-x86_64-11.txz: Rebuilt. /etc/passwd: Added ldap (UID 330). /etc/group: Added ldap (GID 330). a/kernel-generic-5.4.41-x86_64-1.txz: Upgraded. a/kernel-huge-5.4.41-x86_64-1.txz: Upgraded. a/kernel-modules-5.4.41-x86_64-1.txz: Upgraded. a/pkgtools-15.0-noarch-33.txz: Rebuilt. setup.services: added support for rc.openldap and rc.openvpn. ap/hplip-3.20.5-x86_64-1.txz: Upgraded. d/kernel-headers-5.4.41-x86-1.txz: Upgraded. d/python-setuptools-46.3.0-x86_64-1.txz: Upgraded. d/python3-3.8.3-x86_64-1.txz: Upgraded. k/kernel-source-5.4.41-noarch-1.txz: Upgraded. n/openldap-2.4.50-x86_64-1.txz: Added. This is a complete OpenLDAP package with both client and server support. Thanks to Giuseppe Di Terlizzi for help with the server parts. n/openldap-client-2.4.50-x86_64-1.txz: Removed. x/mesa-20.0.7-x86_64-1.txz: Upgraded. isolinux/initrd.img: Rebuilt. kernels/*: Upgraded. testing/packages/PAM/hplip-3.20.5-x86_64-1_pam.txz: Upgraded. usb-and-pxe-installers/usbboot.img: Rebuilt.
69 lines
1.5 KiB
Bash
69 lines
1.5 KiB
Bash
#!/bin/sh
|
|
# Start/stop/restart the OpenLDAP server (slapd).
|
|
|
|
# Source default settings:
|
|
if [ -r /etc/default/slapd ]; then
|
|
. /etc/default/slapd
|
|
fi
|
|
|
|
# If needed, create run directory:
|
|
if [ ! -d /var/run/openldap ]; then
|
|
mkdir -p /var/run/openldap
|
|
chown ldap:ldap /var/run/openldap
|
|
fi
|
|
|
|
slapd_start() {
|
|
if [ -e /var/run/openldap/slapd.pid ]; then
|
|
echo "ERROR: Not starting OpenLDAP server because /var/run/openldap/slapd.pid exists."
|
|
elif [ -x /usr/sbin/slapd ]; then
|
|
echo "Starting OpenLDAP server: /usr/sbin/slapd -u ldap -h "$SLAPD_URLS" $SLAPD_OPTIONS"
|
|
/usr/sbin/slapd -u ldap -h "$SLAPD_URLS" $SLAPD_OPTIONS 1> /dev/null 2> /dev/null
|
|
fi
|
|
}
|
|
|
|
slapd_stop() {
|
|
if [ -e /var/run/openldap/slapd.pid ]; then
|
|
echo "Stopping OpenLDAP server."
|
|
kill -INT $(cat /var/run/openldap/slapd.pid)
|
|
else
|
|
echo "ERROR: Not stopping OpenLDAP server because /var/run/openldap/slapd.pid does not exist."
|
|
fi
|
|
rm -f /var/run/openldap/slapd.pid
|
|
}
|
|
|
|
slapd_restart() {
|
|
slapd_stop
|
|
sleep 1
|
|
slapd_start
|
|
}
|
|
|
|
slapd_status() {
|
|
if [ -e /var/run/openldap/slapd.pid ]; then
|
|
if ps axc | grep slapd >/dev/null 2>&1; then
|
|
echo "OpenLDAP is running."
|
|
return 0
|
|
fi
|
|
echo "OpenLDAP PID file exists but the service is down."
|
|
return 1
|
|
else
|
|
echo "OpenLDAP is stopped."
|
|
return 0
|
|
fi
|
|
}
|
|
|
|
case "$1" in
|
|
'start')
|
|
slapd_start
|
|
;;
|
|
'stop')
|
|
slapd_stop
|
|
;;
|
|
'restart')
|
|
slapd_restart
|
|
;;
|
|
'status')
|
|
slapd_status
|
|
;;
|
|
*)
|
|
echo "usage $0 start|stop|restart"
|
|
esac
|