PREIN
/bin/sh
if [ -n "`getgid http`" ]; then
if [ "`getgid http`" != "51" ]; then
echo "Error: group http doesn't have gid=51. Correct this before installing mathopd." 1>&2
exit 1
fi
else
/usr/sbin/groupadd -g 51 -r -f http
fi
if [ -n "`id -u http 2>/dev/null`" ]; then
if [ "`id -u http`" != "51" ]; then
echo "Error: user http doesn't have uid=51. Correct this before installing mathopd." 1>&2
exit 1
fi
else
/usr/sbin/useradd -u 51 -r -d /home/httpd -s /bin/false -c "HTTP User" -g http http 1>&2
fi
PREUN
/bin/sh
if [ "$1" = "0" ]; then
if [ -f /var/lock/subsys/mathopd ]; then
/etc/rc.d/init.d/mathopd stop 1>&2
fi
/sbin/chkconfig --del mathopd
fi
POSTIN
/bin/sh
/sbin/chkconfig --add mathopd
if [ -f /var/lock/subsys/mathopd ]; then
/etc/rc.d/init.d/mathopd restart 1>&2
else
echo "Run \"/etc/rc.d/init.d/mathopd start\" to start mathopd daemon."
fi
POSTUN
/bin/sh
if [ "$1" = "0" ]; then
/usr/sbin/userdel http
/usr/sbin/groupdel http
fi