PRETRANS
/bin/sh
# prevent symlink creation failure on update
if [ -d /etc/nagios/plugins.d -a ! -L /etc/nagios/plugins.d ]; then
if [ ! -d /etc/nagios/conf.d ]; then
mkdir -p /etc/nagios/conf.d
fi
mv -f /etc/nagios/plugins.d/* /etc/nagios/conf.d 2>/dev/null
rmdir /etc/nagios/plugins.d
fi
PREIN
/bin/sh
/usr/share/rpm-helper/add-user nagios $1 nagios /var/log/nagios /bin/sh
/usr/bin/gpasswd -a apache nagios >/dev/null 2>&1 || :
PREUN
/bin/sh
/usr/share/rpm-helper/del-service nagios $1 nagios
POSTIN
/bin/sh
/usr/bin/systemd-tmpfiles --create nagios.conf
/usr/share/rpm-helper/add-service nagios $1 nagios
POSTUN
/bin/sh
/usr/share/rpm-helper/del-user nagios $1 nagios