PREIN
/bin/sh
/usr/sbin/groupadd -g 27 -o -r mysql >/dev/null 2>&1 || :
/usr/sbin/useradd -M -N -g mysql -o -r -d /var/lib/mysql -s /bin/bash \
-c "MySQL Server" -u 27 mysql >/dev/null 2>&1 || :
PREUN
/bin/sh
if [ $1 = 0 ]; then
/sbin/service mysqld stop >/dev/null 2>&1
/sbin/chkconfig --del mysqld
fi
POSTIN
/bin/sh
if [ $1 = 1 ]; then
/sbin/chkconfig --add mysqld
fi
/bin/chmod 0755 /var/lib/mysql
/bin/touch /var/log/mysqld.log
POSTUN
/bin/sh
if [ $1 -ge 1 ]; then
/sbin/service mysqld condrestart >/dev/null 2>&1 || :
fi