HEX
Server: Apache
System: Linux vps37023 6.8.0-83-generic #83~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Sep 9 18:19:47 UTC 2 x86_64
User: alternativsm (5771646)
PHP: 8.1.32
Disabled: NONE
Upload Files
File: //var/lib/dpkg/info/logchomper.prerm
#!/bin/sh


before_remove() {
    :

debsystemctl=$(command -v deb-systemd-invoke || echo systemctl)
$debsystemctl stop logchomper.service >/dev/null || true
systemctl disable logchomper.service >/dev/null || true
$debsystemctl stop redis-accessproxy.service >/dev/null || true
systemctl disable redis-accessproxy.service >/dev/null || true
systemctl --system daemon-reload >/dev/null || true
}

dummy() {
    :
}

if [ "${1}" = "remove" -a -z "${2}" ]
then
    # "before remove" goes here
    before_remove
elif [ "${1}" = "upgrade" ]
then
    # Executed before the old version is removed
    # upon upgrade.
    # We should generally not do anything here. The newly installed package
    # should do the upgrade, not the uninstalled one, since it can't anticipate
    # what new things it will have to do to upgrade for the new version.
    dummy
elif echo "${1}" | grep -E -q "(fail|abort)"
then
    echo "Failed to install before the pre-removal script was run." >&2
    exit 1
fi