PREUN
/bin/sh
if [ "$1" = "0" ]; then
{
if [ -f /var/lock/subsys/pyrss ]; then
/sbin/service pyrss stop 1>&2 || :;
fi }; /sbin/chkconfig --del pyrss
fi
POSTIN
/bin/sh
if [ -f /etc/jabber/secret ] ; then
SECRET=`cat /etc/jabber/secret`
if [ -n "$SECRET" ] ; then
echo "Updating component authentication secret in pyrss.xml..."
/bin/sed -i -e "s/'>password<'/'>$SECRET<'/" /etc/jabber/pyrss.xml
fi
fi
/sbin/chkconfig --add pyrss
{
skip_auto_restart() {
[ -f /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm
[ -f /etc/sysconfig/pyrss ] && . /etc/sysconfig/pyrss
echo ${RPM_SKIP_AUTO_RESTART:-no}
};
if [ $(skip_auto_restart) = no ]; then
if [ -f /var/lock/subsys/pyrss ]; then
/sbin/service pyrss restart 1>&2 || :;
else
echo 'Run "/sbin/service pyrss start" to start PyRSS.'
fi
fi };