PREUN
/bin/sh
if [ $1 -eq 0 ]; then
if [ $1 -eq 0 ] && [ -x /usr/bin/systemctl ]; then
# Package removal, not upgrade
/usr/bin/systemctl --no-reload disable --now rfiod.service || :
fi
fi
POSTIN
/bin/sh
# Clean up pre-systemd config
if [ -r /etc/rc.d/init.d/rfiod ] ; then
/sbin/service rfiod stop > /dev/null 2>&1 || :
/sbin/chkconfig --del rfiod > /dev/null 2>&1 || :
fi
if [ $1 -eq 1 ] && [ -x /usr/bin/systemctl ]; then
# Initial installation
/usr/bin/systemctl --no-reload preset rfiod.service || :
fi
POSTUN
/bin/sh
if [ $1 -ge 1 ]; then
if [ $1 -ge 1 ] && [ -x /usr/bin/systemctl ]; then
# Package upgrade, not uninstall
/usr/bin/systemctl try-restart rfiod.service || :
fi
fi