PREIN
/bin/sh
/usr/sbin/groupadd -g 60 -r -f piranha >/dev/null 2>&1 ||:
/usr/sbin/useradd -u 60 -g 60 -d /etc/sysconfig/ha -r \
-s /sbin/nologin piranha >/dev/null 2>&1 ||:
PREUN
/bin/sh
if [ $1 = 0 ]; then
/sbin/service pulse stop >/dev/null 2>&1
/sbin/chkconfig --del pulse
fi
if [ $1 = 0 ]; then
/sbin/service piranha-gui stop >/dev/null 2>&1
/sbin/chkconfig --del piranha-gui
fi
POSTIN
/bin/sh
/sbin/chkconfig --add pulse
/sbin/chkconfig --add piranha-gui
POSTUN
/bin/sh
if [ $1 = 0 ] ; then
/usr/sbin/userdel piranha
# userdel removes group as well
# /usr/sbin/groupdel piranha
fi
if [ $1 = 1 ] ; then
/sbin/service pulse condrestart >/dev/null 2>&1
/sbin/service piranha-gui condrestart >/dev/null 2>&1
fi