mariadb/support-files/rpm/server-preun.sh
Sergei Golubchik 108265bd9e MDEV-295 Do NOT start mysql when installing MariaDB rpms
but restart it on upgrade, if it was already running
2012-05-25 21:08:26 +02:00

14 lines
359 B
Bash

if [ $1 = 0 ] ; then
# Stop MySQL before uninstalling it
if [ -x %{_sysconfdir}/init.d/mysql ] ; then
%{_sysconfdir}/init.d/mysql stop > /dev/null
fi
# Don't start it automatically anymore
if [ -x /sbin/chkconfig ] ; then
/sbin/chkconfig --del mysql
fi
fi
# We do not remove the mysql user since it may still own a lot of
# database files.