function post_install() {
#!/bin/sh
# Nach Installation und Update: Timer fuer automatische Updates an.
if [ -d /run/systemd/system ] && command -v systemctl >/dev/null 2>&1; then
	systemctl daemon-reload >/dev/null 2>&1 || true
	systemctl enable --now sarebamail-agent-update.timer >/dev/null 2>&1 || true
fi
exit 0

}

function pre_remove() {
#!/bin/sh
# Nur beim Entfernen, nicht beim Update: deb ruft mit "remove"/"purge",
# rpm mit 0, pacman (pre_remove) ohne Argument.
case "${1:-remove}" in
	remove|purge|0) ;;
	*) exit 0 ;;
esac
if [ -d /run/systemd/system ] && command -v systemctl >/dev/null 2>&1; then
	systemctl disable --now sarebamail-agent-update.timer >/dev/null 2>&1 || true
fi
exit 0

}

