#!/bin/sh
# SPDX-License-Identifier: AGPL-3.0-only
# Provenance-includes-location: https://github.com/cortexproject/cortex/blob/master/packaging/deb/control/prerm
# Provenance-includes-license: Apache-2.0
# Provenance-includes-copyright: The Cortex Authors.

set -e

# shellcheck disable=1091
[ -f /etc/default/mimir ] && . /etc/default/mimir

case "$1" in
  remove)
    if command -v systemctl 2>/dev/null; then
        systemctl stop mimir.service >/dev/null 2>&1 || :
    fi
    ;;
esac
