PREIN
/bin/sh
/usr/sbin/useradd -r -d /var/lib/mldonkey \
-c "MlDonkey service" -s /bin/bash mldonkey 2>/dev/null || :
PREUN
/bin/sh
#if [ "$1" == "0" ]; then
# /sbin/service mldonkey stop >/dev/null 2>&1 || :
# /sbin/chkconfig --del mldonkey || :
#fi
if [ $1 -eq 0 ] ; then
# Package removal, not upgrade
/bin/systemctl --no-reload disable mldonkey.service > /dev/null 2>&1 || :
/bin/systemctl stop mldonkey.service > /dev/null 2>&1 || :
fi
POSTIN
/bin/sh
#if [ "$1" == "1" ]; then
# /sbin/chkconfig --add mldonkey || :
#fi
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 mldonkey.service >/dev/null 2>&1 || :
fi