PREUN
/bin/sh
export LANG=C
if [ $1 = 0 ]; then
/usr/sbin/update-alternatives --display dpmcopyd | \
grep currently | grep -q dpm-postgres && \
/sbin/service dpm-postgres-copyd stop > /dev/null 2>&1 || :
/usr/sbin/update-alternatives --remove dpmcopyd \
/usr/lib/dpm-postgres/dpmcopyd
/sbin/chkconfig --del dpm-postgres-copyd
fi
POSTIN
/bin/sh
if [ $1 = 1 ]; then
/sbin/chkconfig --add dpm-postgres-copyd
fi
/usr/sbin/update-alternatives --install /usr/sbin/dpmcopyd dpmcopyd \
/usr/lib/dpm-postgres/dpmcopyd 10 \
--slave /usr/share/man/man8/dpmcopyd.8.gz dpmcopyd.8.gz \
/usr/lib/dpm-postgres/dpmcopyd.8.gz \
--slave /etc/sysconfig/dpmcopyd dpmcopyd.conf \
/etc/dpm-postgres/dpmcopyd.conf \
--slave /etc/logrotate.d/dpmcopyd dpmcopyd.logrotate \
/etc/dpm-postgres/dpmcopyd.logrotate \
--initscript dpm-postgres-copyd
POSTUN
/bin/sh
export LANG=C
if [ $1 -ge 1 ]; then
/usr/sbin/update-alternatives --display dpmcopyd | \
grep currently | grep -q dpm-postgres && \
/sbin/service dpm-postgres-copyd condrestart > /dev/null 2>&1 || :
fi