PREIN
/bin/sh
# Create BOINC user and group
getent group boinc >/dev/null || groupadd -r boinc
getent passwd boinc >/dev/null || \
useradd -r -g boinc -d /var/lib/boinc -s /sbin/nologin \
-c "BOINC client account." boinc
exit 0
PREUN
/bin/sh
if [ $1 -eq 0 ]; then #if uninstalling, not only updating
/sbin/service boinc-client stop
/sbin/chkconfig --del boinc-client
fi
POSTIN
/bin/sh
/sbin/ldconfig
/sbin/chkconfig --add boinc-client
#correct wrong owner and group on files under /var/lib/boinc and log files
#caused by bug fixed in 5.10.45-8
chown --silent -R boinc:boinc /var/log/boinc* \
/var/lib/boinc/* 2>/dev/null || :
POSTUN
/bin/sh
/sbin/ldconfig
if [ "$1" -ge "1" ] ; then
/sbin/service boinc-client condrestart >/dev/null 2>&1 || :
fi