#!/bin/bash set -e # prerm script for logcorrelator .deb package case "$1" in remove|deconfigure) # Stop and disable the service if [ -x /bin/systemctl ] && [ -d /run/systemd/system ]; then systemctl stop logcorrelator.service 2>/dev/null || true systemctl disable logcorrelator.service 2>/dev/null || true systemctl daemon-reload fi ;; upgrade) # On upgrade, just stop the service (will be restarted by postinst) if [ -x /bin/systemctl ] && [ -d /run/systemd/system ]; then systemctl stop logcorrelator.service 2>/dev/null || true fi ;; *) echo "prerm called with unknown argument '$1'" >&2 exit 1 ;; esac exit 0