Sophie

Sophie

distrib > Mandriva > cs4.0 > x86_64 > by-pkgid > cd915757be323dbb1dfd326f456f2996 > scriptlet

nagios-2.5-2mlcs4.x86_64.rpm

PREIN

/bin/sh
/usr/share/rpm-helper/add-user nagios $1 nagios /var/log/nagios /bin/sh 
# this logic is taken from sympa
groups=`groups apache | cut -d " " -f 4- | tr ' ' ,`
if [ -n "$groups" ]; then
    groups="$groups,nagios"
else
    groups="nagios";
fi
usermod -G $groups apache

PREUN

/bin/sh
/usr/share/rpm-helper/del-service nagios $1 nagios

POSTIN

/bin/sh
/usr/share/rpm-helper/add-service nagios $1 nagios

POSTUN

/bin/sh
/usr/share/rpm-helper/del-user nagios $1 nagios 

if [ "$1" -ge "1" ]; then
    /sbin/service nagios condrestart >/dev/null 2>&1
fi