#!/bin/sh
set -e

# Automatically added by dh_installsystemd/13.14.1ubuntu5
if [ -z "${DPKG_ROOT:-}" ] && [ "$1" = remove ] && [ -d /run/systemd/system ] ; then
	deb-systemd-invoke stop 'mariadb.service' >/dev/null || true
fi
# End automatically added section
# Automatically added by dh_installinit/13.14.1ubuntu5
if [ -z "${DPKG_ROOT:-}" ] && [ "$1" = remove ] && [ -x "/etc/init.d/mariadb" ] ; then
	invoke-rc.d --skip-systemd-native mariadb stop || exit 1
fi
# End automatically added section


# Modified dh_systemd_start snippet that's not added automatically
if [ -d /run/systemd/system ]
then
  deb-systemd-invoke stop mariadb.service >/dev/null
  # Modified dh_installinit snippet to only run with sysvinit
elif [ -x "/etc/init.d/mariadb" ]
then
  invoke-rc.d mariadb stop || exit $?
fi
