HEX
Server: nginx/1.18.0
System: Linux oas2 6.8.0-1039-oracle #40~22.04.1-Ubuntu SMP Wed Oct 29 05:11:00 UTC 2025 aarch64
User: root (0)
PHP: 8.1.2-1ubuntu2.23
Disabled: NONE
Upload Files
File: /var/lib/dpkg/info/unified-monitoring-agent.postrm
#! /bin/sh

set -e

echo "Running post uninstallation script"

if [ "$1" = "upgrade" ]; then
    echo "Upgrade detected: systemd/init.d unit files for unified-monitoring-agent will not be removed."
else
    # Just leave this file, because this line could delete td-agent.conf in a
    # *UPGRADE* process :-(
    if [ -e "/etc/prelink.conf.d/unified-monitoring-agent-ruby.conf" ]; then
        echo "Uninstalling /etc/prelink.conf.d/unified-monitoring-agent-ruby.conf ..."
        rm -f /etc/prelink.conf.d/unified-monitoring-agent-ruby.conf
    fi
    if [ -d "/opt/unified-monitoring-agent/embedded/" ]; then
        rm -rf "/opt/unified-monitoring-agent/embedded/"
    fi
fi

if [ "$1" = "purge" ]; then
    rm -f /etc/default/unified-monitoring-agent
    rm -f /var/run/unified-monitoring-agent/*
    rm -rf /var/log/unified-monitoring-agent/buffer
    rm -rf /var/log/unified-monitoring-agent/*

    rm /etc/init.d/unified-monitoring-agent
    rm /usr/sbin/unified-monitoring-agent
    rm /usr/sbin/unified-monitoring-agent-gem

    if [ -f /etc/logrotate.d/unified-monitoring-agent ]; then
        rm /etc/logrotate.d/unified-monitoring-agent
    fi

fi

# Automatically added by dh_makeshlibs
if [ "$1" = "remove" ]; then
    ldconfig
fi
# End automatically added section
# Automatically added by dh_installinit
if [ "$1" = "purge" ] ; then
    update-rc.d unified-monitoring-agent remove >/dev/null
fi
# End automatically added section