Sophie

Sophie

distrib > Fedora > 18 > x86_64 > media > updates > by-pkgid > 35dc24743bc77ef72be1fb68d533c0a1 > scriptlet

mt-daapd-0.2.4.2-17.fc18.x86_64.rpm

PREIN

/bin/sh
getent group mt-daapd >/dev/null || groupadd -r mt-daapd
getent passwd mt-daapd >/dev/null || \
    useradd -r -g mt-daapd -d /var/lib/mt-daapd -s /sbin/nologin \
    -c 'mt-daapd' mt-daapd
exit 0

PREUN

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

POSTIN

/bin/sh
if [ $1 -eq 1 ] ; then 
    # Initial installation 
    /bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi

POSTUN

/bin/sh
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -ge 1 ] ; then
    # Package upgrade, not uninstall
    /bin/systemctl try-restart mt-daapd.service >/dev/null 2>&1 || :
fi

Triggers

mt-daapd < 0.2.4.2-9

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

# Run these because the SysV package being removed won't do them
/sbin/chkconfig --del mt-daapd >/dev/null 2>&1 || :
/bin/systemctl try-restart mt-daapd.service >/dev/null 2>&1 || :