Sophie

Sophie

distrib > Momonga > development > i686 > media > os > by-pkgid > ed47ca54cfc9847edd68c4d973178f77 > scriptlet

pcsc-lite-1.8.11-1m.mo8.i686.rpm

PREUN

/bin/sh

if [ $1 -eq 0 ] ; then 
        # Package removal, not upgrade 
        /usr/bin/systemctl --no-reload disable pcscd.socket pcscd.service > /dev/null 2>&1 || : 
        /usr/bin/systemctl stop pcscd.socket pcscd.service > /dev/null 2>&1 || : 
fi

POSTIN

/bin/sh

if [ $1 -eq 1 ] ; then 
        # Initial installation 
        /usr/bin/systemctl preset pcscd.socket pcscd.service >/dev/null 2>&1 || : 
fi

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 pcscd.socket pcscd.service >/dev/null 2>&1 || : 
fi

Triggers

pcsc-lite < 1.7

/bin/sh
# Save the current service runlevel info
# User must manually run systemd-sysv-convert --apply pcscd
# to migrate them to systemd targets
/usr/bin/systemd-sysv-convert --save pcscd >/dev/null 2>&1 ||:

# Enable pcscd socket activation
/bin/systemctl enable pcscd.socket >/dev/null 2>&1

# Run these because the SysV package being removed won't do them
/sbin/chkconfig --del pcscd >/dev/null 2>&1 || :

# Restart the service if it's already running
if /bin/systemctl is-active pcscd.service >/dev/null 2>&1 ; then
    /bin/systemctl stop pcscd.service >/dev/null 2>&1 ||:
    /bin/systemctl start pcscd.socket pcscd.service >/dev/null 2>&1 ||:
fi