From ee6407728fa3cc43b32f69e88a4e0a5d28dc5235 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 14:06:34 +0200 Subject: Adding debian version 3.5.24-0+deb11u1. Signed-off-by: Daniel Baumann --- debian/ip-down.d | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 debian/ip-down.d (limited to 'debian/ip-down.d') diff --git a/debian/ip-down.d b/debian/ip-down.d new file mode 100644 index 0000000..4101554 --- /dev/null +++ b/debian/ip-down.d @@ -0,0 +1,34 @@ +#!/bin/sh -e + +# Called when an interface disconnects +# Written by LaMont Jones + +# start or reload Postfix as needed + +# If /usr isn't mounted yet, silently bail. +if [ ! -d /usr/lib/postfix ]; then + exit 0 +fi + +RUNNING="" +# If master is running, force a queue run to unload any mail that is +# hanging around. Yes, sendmail is a symlink... +if [ -f /var/spool/postfix/pid/master.pid ]; then + pid=$(sed 's/ //g' /var/spool/postfix/pid/master.pid) + exe=$(ls -l /proc/$pid/exe 2>/dev/null | sed 's/.* //;s/.*\///') + if [ "X$exe" = "Xmaster" ]; then + RUNNING="y" + fi +fi + +if [ ! -x /sbin/resolvconf ]; then + f=/etc/resolv.conf + if ! cp $f $(postconf -hx queue_directory)$f 2>/dev/null; then + exit 0 + fi + if [ -n "$RUNNING" ]; then + service postfix reload >/dev/null 2>&1 + fi +fi + +exit 0 -- cgit v1.2.3