Sophie

Sophie

distrib > Fedora > 18 > i386 > by-pkgid > 5b3417f9ee38b786664f543450631508 > scriptlet

mediatomb-0.12.1-31.fc18.20120403gitb66dc1.i686.rpm

PREIN

/bin/sh
getent group mediatomb >/dev/null || groupadd -r mediatomb
getent passwd mediatomb >/dev/null || \
useradd -r -g mediatomb -d /etc/mediatomb -s /sbin/nologin \
    -c "To run Mediatomb" mediatomb
exit 0

PREUN

/bin/sh
if [ $1 -eq 0 ] ; then
    # Package removal, not upgrade
    /bin/systemctl --no-reload disable mediatomb.service > /dev/null 2>&1 || :
    /bin/systemctl stop mediatomb.service > /dev/null 2>&1 || :
    /bin/systemctl --no-reload disable mediatomb-mysql.service > /dev/null 2>&1 || :
    /bin/systemctl stop mediatomb-mysql.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 mediatomb.service >/dev/null 2>&1 || :
    /bin/systemctl try-restart mediatomb-mysql.service >/dev/null 2>&1 || :
fi

Triggers

mediatomb < 0.1.12-16

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

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