PREIN
/bin/sh
getent group munin >/dev/null || groupadd -r munin
getent passwd munin >/dev/null || \
useradd -r -g munin -d /var/lib/munin -s /sbin/nologin \
-c "Munin user" munin
exit 0
PREUN
/bin/sh
test "$1" != 0 || /etc/rc.d/init.d/munin-node stop &>/dev/null || :
test "$1" != 0 || /sbin/chkconfig --del munin-node
#
# main package scripts
#
POSTIN
/bin/sh
/sbin/chkconfig --add munin-node
# Only run configure on a new install, not an upgrade.
if [ "$1" = "1" ]; then
/usr/sbin/munin-node-configure --shell 2> /dev/null | sh >& /dev/null || :
fi