Package: spampd
Version: 2.53-1
Severity: wishlist
Tags: patch

Dear Maintainer,

Attempting to `systemctl reload spampd.service` results in the error:

    Failed to reload spampd.service: Job type reload is not applicable for unit 
spampd.service.

For a service to be reloaded, it must define ExecReload=, which
spampd.service does not currently do.  Since SpamPD supports reloading
via SIGHUP (see [mpaperno/spampd#20]), adding:

    ExecReload=kill -HUP $MAINPID

(matching the example from systemd.service(5)) to the [Service] section
of spampd.service should be sufficient.  I've attached a patch for
reference.

Thanks for considering,
Kevin
>From 897e2d06b47c8d6975ecd75161defc086527412a Mon Sep 17 00:00:00 2001
Message-Id: 
<897e2d06b47c8d6975ecd75161defc086527412a.1603208436.git.ke...@kevinlocke.name>
From: Kevin Locke <ke...@kevinlocke.name>
Date: Tue, 20 Oct 2020 09:31:42 -0600
Subject: [PATCH] spampd.service: Support reload via ExecReload=

Attempting to `systemctl reload spampd.service` results in the error:

    Failed to reload spampd.service: Job type reload is not applicable for unit 
spampd.service.

For a service to be reloaded, it must define ExecReload=.  Since SpamPD
supports reloading via SIGHUP (see [mpaperno/spampd#20]), define it to
do so.  Note: This matches the example in systemd.service(5) verbatim.

[mpaperno/spampd#20]: https://github.com/mpaperno/spampd/pull/20

Signed-off-by: Kevin Locke <ke...@kevinlocke.name>
---
 debian/spampd.service | 1 +
 1 file changed, 1 insertion(+)

diff --git a/debian/spampd.service b/debian/spampd.service
index 31293ff..0822a33 100644
--- a/debian/spampd.service
+++ b/debian/spampd.service
@@ -6,6 +6,7 @@ After=network.target local-fs.service
 EnvironmentFile=-/var/run/spampd/spampd.arguments
 ExecStartPre=/usr/share/spampd/process_arguments.sh
 ExecStart=/usr/sbin/spampd --setsid $SPAMPD_ARGS
+ExecReload=kill -HUP $MAINPID
 Restart=on-failure
 PIDFile=/var/run/spampd/spampd.pid
 
-- 
2.28.0

Reply via email to