mariadb/debian/mariadb-plugin-columnstore.postrm
Roman Nozdrin 1e7a68f84a Both RPM and DEB now restart MDB uninstalling the plugin.
Both RPM and DEB now conflicts on previous versions of MCS.

    Trim .deb packaging.

    MCS now depends on python. Python version varies in distributions.
2020-06-19 21:04:18 +02:00

29 lines
605 B
Bash

#!/bin/bash
set -e
if [ "$1" = "purge" ]; then
rm -rf /var/lib/columnstore
rm -rf /etc/columnstore
rm -f /etc/mysql/mariadb.conf.d/columnstore.cnf.rpmsave
fi
running_systemd() {
if [ "$(ps --no-headers -o comm 1)" = "systemd" ]; then
echo 0
else
echo 1
fi
}
if [ ! -z "$(pgrep -x mysqld)" ];then
systemctl cat mariadb.service > /dev/null 2>&1
if [ $? -eq 0 ] && [ $(running_systemd) -eq 0 ]; then
systemctl restart mariadb.service > /dev/null 2>&1
else
pkill mysqld > /dev/null 2>&1
/usr/bin/mysqld_safe &
fi
fi
#DEBHELPER#