2012-05-22 11:04:32 +02:00
|
|
|
if [ $1 = 0 ] ; then
|
2019-03-22 01:55:35 +01:00
|
|
|
# Stop MySQL before uninstalling it
|
2012-05-25 21:08:26 +02:00
|
|
|
# Don't start it automatically anymore
|
2019-03-22 01:55:35 +01:00
|
|
|
if [ -x /usr/bin/systemctl ] ; then
|
|
|
|
/usr/bin/systemctl stop mariadb.service > /dev/null 2>&1
|
|
|
|
/usr/bin/systemctl disable mariadb.service > /dev/null 2>&1
|
|
|
|
fi
|
|
|
|
if [ -x %{_sysconfdir}/init.d/mysql ] ; then
|
|
|
|
%{_sysconfdir}/init.d/mysql stop > /dev/null
|
2019-06-07 20:04:09 +02:00
|
|
|
if [ -x /sbin/chkconfig ] ; then
|
2019-10-01 10:45:52 +04:00
|
|
|
/sbin/chkconfig --del mysql > /dev/null 2>&1 || :
|
2019-06-07 20:04:09 +02:00
|
|
|
fi
|
2019-03-22 01:55:35 +01:00
|
|
|
fi
|
2012-05-22 11:04:32 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
# We do not remove the mysql user since it may still own a lot of
|
|
|
|
# database files.
|
|
|
|
|