PREUN
/bin/sh
if [ $1 -eq 0 ] ; then
# Package removal, not upgrade
/usr/bin/systemctl --no-reload disable lircd.service lircmd.service > /dev/null 2>&1 || :
/usr/bin/systemctl stop lircd.service lircmd.service > /dev/null 2>&1 || :
fi
POSTIN
/bin/sh
if [ $1 -eq 1 ] ; then
# Initial installation
/usr/bin/systemctl preset lircd.service lircmd.service >/dev/null 2>&1 || :
fi
systemd-tmpfiles --create /usr/lib/tmpfiles.d/lirc.conf
# Remove stale links after service name change lirc -> lircd:
find /etc/systemd -name lirc.service -xtype l -delete || :
POSTUN
/bin/sh
/usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -ge 1 ] ; then
# Package upgrade, not uninstall
/usr/bin/systemctl try-restart lircd.service lircmd.servic >/dev/null 2>&1 || :
fi
Triggers
lirc <
0.9.0-9
/bin/sh
# Save the current service runlevel info
# User must manually run systemd-sysv-convert --apply lirc
# to migrate them to systemd targets
/usr/bin/systemd-sysv-convert --save lirc >/dev/null 2>&1 ||:
# Run these because the SysV package being removed won't do them
/sbin/chkconfig --del lirc >/dev/null 2>&1 || :
/bin/systemctl try-restart lircd.service >/dev/null 2>&1 || :