summaryrefslogtreecommitdiff
path: root/debian/mariadb-plugin-columnstore.postrm
blob: b2e19774ec1264a0425d3bbf09ffbe5f5f86af62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/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

# Automatically restart MariaDB after ColumnStore plugin has been removed
case "$1" in
  purge|remove|disappear)
    if [ -d /run/systemd/system ]; then
      # If systemd
      deb-systemd-invoke restart mariadb.service >/dev/null
    elif [ -x "/etc/init.d/mariadb" ]; then
      # Fall-back to SysV init
      invoke-rc.d mariadb restart || exit $?
    fi
  ;;
esac

#DEBHELPER#