Sophie

Sophie

distrib > PLD > th > x86_64 > by-pkgid > ec2ab33c6517ec78bbcca435fca4ad9a > scriptlet

openldap-overlay-autogroup-2.4.59-6.x86_64.rpm

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