From 9663a5b6a8a216033d8ee3d5c64fc72b9fcb6972 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Thu, 10 May 2018 13:31:13 -0700 Subject: [PATCH] do not remove the socket if spamass milter is already running --- debian/changelog | 3 +++ debian/rules | 2 ++ debian/spamass-milter.init | 4 ++++ 3 files changed, 9 insertions(+) diff --git a/debian/changelog b/debian/changelog index a24efdf..841160a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,9 @@ spamass-milter (0.4.0-2) unstable; urgency=medium * Document milter env variables (closes: #816799) + * Do not remove the socket if spamass-milter is already running (closes: + #782252) + * Enable the hardening flags (closes: #879671) -- Don Armstrong Thu, 10 May 2018 12:13:11 -0700 diff --git a/debian/rules b/debian/rules index 5021129..ba664ea 100755 --- a/debian/rules +++ b/debian/rules @@ -1,6 +1,8 @@ #!/usr/bin/make -f DH_VERBOSE = 1 +# enable hardening +export DEB_BUILD_MAINT_OPTIONS = hardening=+all %: dh $@ --parallel --with autotools_dev diff --git a/debian/spamass-milter.init b/debian/spamass-milter.init index 310ae83..b94fd43 100644 --- a/debian/spamass-milter.init +++ b/debian/spamass-milter.init @@ -90,6 +90,10 @@ fi; set -e start() { + if status; then + echo "$NAME is already running"; + exit 1; + fi; # Because the default socket is in the same location as the # pidfile, we create them in this order. for DIR in "$(dirname $PIDFILE)" "$(dirname $SOCKET)"; do -- 2.39.2