PREIN
/bin/sh
getent group crossfire >/dev/null || groupadd -r crossfire
getent passwd crossfire >/dev/null || \
useradd -r -g crossfire -d /usr/share/crossfire -s /sbin/nologin \
-c "Daemon account for the crossfire server" crossfire
exit 0
PREUN
/bin/sh
if [ "$1" -le "0" ]; then
/sbin/service crossfire stop > /dev/null 2>&1
/sbin/chkconfig --del crossfire
fi
POSTIN
/bin/sh
/sbin/chkconfig --add crossfire
POSTUN
/bin/sh
if [ "$1" -ge "1" ]; then
/sbin/service crossfire condrestart >/dev/null 2>&1
fi