#!/bin/sh set -e # dpkg calls the OLD package's prerm on an UPGRADE as well as on a removal, and rpm calls it with # an install count. Disabling the timer unconditionally therefore stopped the agent on every # upgrade and left it disabled — silently, because the box stays reachable and nothing else # notices that check-ins have ceased (env-dev-01 and env-dev-08, 2026-09-09). # dpkg: "$1" is `remove`, `upgrade `, `deconfigure …` or `failed-upgrade` # rpm : "$1" is the number of instances that will remain — 1 on upgrade, 0 on uninstall case "${1:-}" in upgrade | failed-upgrade | deconfigure | 1) exit 0 ;; esac if [ -d /run/systemd/system ]; then systemctl disable --now monky-deployd.timer 2>/dev/null || true systemctl disable --now monky-deployd-proxy.service 2>/dev/null || true fi exit 0