PREIN
/bin/sh
# UID:GID 112:112 reserved, see RHBZ#534109.
getent group vhostmd >/dev/null || groupadd -g 112 -r vhostmd
getent passwd vhostmd >/dev/null || \
useradd -u 112 -r -g vhostmd -d /usr/share/vhostmd -s /sbin/nologin \
-c "Virtual Host Metrics Daemon" vhostmd
exit 0
PREUN
/bin/sh
if [ $1 = 0 ] ; then
/sbin/service vhostmd stop >/dev/null 2>&1
/sbin/chkconfig --del vhostmd
fi
POSTIN
/bin/sh
/sbin/chkconfig --add vhostmd
POSTUN
/bin/sh
if [ "$1" -ge "1" ] ; then
/sbin/service vhostmd condrestart >/dev/null 2>&1 || :
fi