summaryrefslogtreecommitdiffstats
path: root/debian/haproxy.postinst
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 09:35:12 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 09:35:12 +0000
commit89057599f4791f03c1ee5de836fbe2b5ea434aa9 (patch)
tree09ef6df146509f94541c1afe9cbd78b7f75e81e7 /debian/haproxy.postinst
parentAdding upstream version 2.6.12. (diff)
downloadhaproxy-89057599f4791f03c1ee5de836fbe2b5ea434aa9.tar.xz
haproxy-89057599f4791f03c1ee5de836fbe2b5ea434aa9.zip
Adding debian version 2.6.12-1+deb12u1.debian/2.6.12-1+deb12u1debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/haproxy.postinst')
-rw-r--r--debian/haproxy.postinst22
1 files changed, 22 insertions, 0 deletions
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