PREUN
/bin/sh
#if [ $1 = 0 ]; then
# /sbin/service mailgraph stop 2>&1 > /dev/null || :
# /sbin/chkconfig --del mailgraph 2>&1 > /dev/null || :
#fi
#exit 0
if [ $1 -eq 0 ] ; then
# Package removal, not upgrade
/bin/systemctl --no-reload disable mailgraph.service > /dev/null 2>&1 || :
/bin/systemctl stop mailgraph.service > /dev/null 2>&1 || :
fi
POSTIN
/bin/sh
#/sbin/chkconfig --add mailgraph 2>&1 > /dev/null || :
if [ $1 -eq 1 ] ; then
# Initial installation
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi
#if [ "$1" -ge "1" ]; then
# /sbin/service mailgraph condrestart 2>&1 > /dev/null || :
#fi
POSTUN
/bin/sh
#if [ "$1" -ge "1" ]; then
# /sbin/service mailgraph condrestart 2>&1 > /dev/null || :
#fi
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -ge 1 ] ; then
# Package upgrade, not uninstall
/bin/systemctl try-restart mailgraph.service >/dev/null 2>&1 || :
fi
Triggers
mailgraph <
1.14-12
/bin/sh
# Save the current service runlevel info
# User must manually run systemd-sysv-convert --apply mailgraph
# to migrate them to systemd targets
/usr/bin/systemd-sysv-convert --save mailgraph >/dev/null 2>&1 ||:
# Run these because the SysV package being removed won't do them
/sbin/chkconfig --del mailgraph >/dev/null 2>&1 || :
/bin/systemctl try-restart mailgraph.service >/dev/null 2>&1 || :