From 9e9d75224939029e63760bddc02d084846f49fe0 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 13 Apr 2024 14:18:06 +0200 Subject: Adding debian version 2.9.5-1. Signed-off-by: Daniel Baumann --- debian/haproxy.postinst | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 debian/haproxy.postinst (limited to 'debian/haproxy.postinst') diff --git a/debian/haproxy.postinst b/debian/haproxy.postinst new file mode 100644 index 0000000..08feb12 --- /dev/null +++ b/debian/haproxy.postinst @@ -0,0 +1,22 @@ +#!/bin/sh + +set -e + +adduser --system --disabled-password --disabled-login --home /var/lib/haproxy \ + --no-create-home --quiet --force-badname --group haproxy + +#DEBHELPER# + +if [ -n "$2" ]; then + if dpkg --compare-versions "$2" lt "1.8.0-1~" && [ -d /run/systemd/system ]; then + # Do a full restart when upgrading to 1.8 series on systemd, as + # the systemd wrapper is no longer there. + invoke-rc.d haproxy restart || true + elif dpkg --compare-versions "$2" gt "1.5~dev24-2~"; then + # Reload already running instances. Since 1.5~dev24-2 we do not stop + # haproxy in prerm during upgrades. + invoke-rc.d haproxy reload || true + fi +fi + +exit 0 -- cgit v1.2.3