PREUN
/bin/sh
if [ "$1" = "0" ]; then
/bin/sed -i -e 's/^[[:blank:]]*moduleload[[:blank:]]\+autogroup.la[[:blank:]]*$/# moduleload autogroup.la/' /etc/openldap/slapd.conf
{
skip_auto_restart() {
[ -f /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm
[ -f /etc/sysconfig/ldap ] && . /etc/sysconfig/ldap
echo ${RPM_SKIP_AUTO_RESTART:-no}
};
if [ $(skip_auto_restart) = no ]; then
if [ ! -x /bin/systemd_booted ] || ! /bin/systemd_booted; then
if [ -f /var/lock/subsys/ldap ]; then
/sbin/service ldap restart 1>&2 || :;
else
echo 'Run "/sbin/service ldap start" to start OpenLDAP server.'
fi
fi
else
if [ ! -x /bin/systemd_booted ] || ! /bin/systemd_booted; then
if [ -f /var/lock/subsys/ldap ]; then
echo 'Run "/sbin/service ldap restart" to restart OpenLDAP server.'
fi
else NORESTART=1 # for %%systemd_post if called after
fi
fi };
fi
POSTIN
/bin/sh
/bin/sed -i -e 's/^#[[:blank:]]*moduleload[[:blank:]]\+autogroup.la[[:blank:]]*$/moduleload autogroup.la/' /etc/openldap/slapd.conf
if [ "$1" = "1" ]; then
{
skip_auto_restart() {
[ -f /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm
[ -f /etc/sysconfig/ldap ] && . /etc/sysconfig/ldap
echo ${RPM_SKIP_AUTO_RESTART:-no}
};
if [ $(skip_auto_restart) = no ]; then
if [ ! -x /bin/systemd_booted ] || ! /bin/systemd_booted; then
if [ -f /var/lock/subsys/ldap ]; then
/sbin/service ldap restart 1>&2 || :;
else
echo 'Run "/sbin/service ldap start" to start OpenLDAP server.'
fi
fi
else
if [ ! -x /bin/systemd_booted ] || ! /bin/systemd_booted; then
if [ -f /var/lock/subsys/ldap ]; then
echo 'Run "/sbin/service ldap restart" to restart OpenLDAP server.'
fi
else NORESTART=1 # for %%systemd_post if called after
fi
fi };
fi