#!/bin/bash # preun script for logcorrelator RPM package # Compatible with CentOS 7, Rocky Linux 8, 9, 10 set -e # $1 = 0: package is being removed # $1 = 1: package is being upgraded if [ "$1" -eq 0 ]; then # Package removal, stop and disable service if [ -x /bin/systemctl ]; then systemctl stop logcorrelator.service systemctl disable logcorrelator.service fi fi exit 0