PREUN
/bin/sh
if [ $1 -eq 0 ] ; then
# Package removal, not upgrade
systemctl --no-reload disable --now pcscd.socket pcscd.service >/dev/null 2>&1 || :
fi
POSTIN
/bin/sh
if [ $1 -eq 1 ] ; then
# Initial installation
systemctl --no-reload preset pcscd.socket pcscd.service >/dev/null 2>&1 || :
fi
# If install, test if pcscd socket is enabled.
# If enabled, then attempt to start it. This will silently fail
# in chroots or other environments where services aren't expected
# to be started.
if [ $1 -eq 1 ] ; then
if systemctl -q is-enabled pcscd.socket > /dev/null 2>&1 ; then
systemctl start pcscd.socket > /dev/null 2>&1 || :
fi
fi
POSTUN
/bin/sh
if [ $1 -ge 1 ] ; then
# Package upgrade, not uninstall
systemctl try-restart pcscd.socket pcscd.service >/dev/null 2>&1 || :
fi