PREIN
/bin/sh
/usr/sbin/useradd -M -r -d /usr/share/icecast -s /sbin/nologin \
-c "icecast streaming server" icecast > /dev/null 2>&1 || :
PREUN
/bin/sh
if [ $1 -eq 0 ] ; then
# Package removal, not upgrade
/bin/systemctl --no-reload disable icecast.service > /dev/null 2>&1 || :
/bin/systemctl stop icecast.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 icecast.service >/dev/null 2>&1 || :
fi
if [ $1 = 0 ] ; then
userdel icecast >/dev/null 2>&1 || :
fi
Triggers
icecast <
2.3.2-7
/bin/sh
# Save the current service runlevel info
/usr/bin/systemd-sysv-convert --save icecast >/dev/null 2>&1 ||:
# Run these because the SysV package being removed won't do them
/sbin/chkconfig --del icecast >/dev/null 2>&1 || :
/bin/systemctl try-restart icecast.service >/dev/null 2>&1 || :