From bb658d21ea2802b73aaf7d497f9fde852e866275 Mon Sep 17 00:00:00 2001 From: Oliver Jowett Date: Fri, 3 Nov 2023 15:44:50 +0800 Subject: [PATCH] Work around debhelper bug #989155 On buster/bullseye this bug is unfixed and the service won't be correctly stopped/restarted if the old package version doesn't stop the service in prerm. --- debian-bullseye/dump1090-fa.preinst | 7 +++++++ debian-buster/dump1090-fa.preinst | 7 +++++++ 2 files changed, 14 insertions(+) create mode 100755 debian-bullseye/dump1090-fa.preinst create mode 100755 debian-buster/dump1090-fa.preinst diff --git a/debian-bullseye/dump1090-fa.preinst b/debian-bullseye/dump1090-fa.preinst new file mode 100755 index 000000000..a203c406a --- /dev/null +++ b/debian-bullseye/dump1090-fa.preinst @@ -0,0 +1,7 @@ +#!/bin/sh +set -e + +# Work around Debian bug #989155 +if [ "$1" = upgrade ] && [ -d /run/systemd/system ] ; then + deb-systemd-invoke stop 'dump1090-fa.service' >/dev/null || true +fi diff --git a/debian-buster/dump1090-fa.preinst b/debian-buster/dump1090-fa.preinst new file mode 100755 index 000000000..a203c406a --- /dev/null +++ b/debian-buster/dump1090-fa.preinst @@ -0,0 +1,7 @@ +#!/bin/sh +set -e + +# Work around Debian bug #989155 +if [ "$1" = upgrade ] && [ -d /run/systemd/system ] ; then + deb-systemd-invoke stop 'dump1090-fa.service' >/dev/null || true +fi