Hi Shawn,

why did you not contact pkg-systemd-maintainers before filing this
bug? You are missing the usertag we use for tracking systemd-unit bugs
and your service file does not follow best practices.

Please contact us before filing any more of these bugs.

For the record, here is my proposed modification of the service file:

--- i/debian/spamassassin.service
+++ w/debian/spamassassin.service
@@ -2,8 +2,6 @@
 Description=Perl-based spam filter using text analysis
 
 [Service]
-EnvironmentFile=-/etc/default/spamassassin
-ExecStartPre=/usr/bin/test 0 != ${ENABLED}
 ExecStart=/usr/sbin/spamd
 ExecReload=/bin/kill -HUP $MAINPID

To disable services with systemd, users use “systemctl disable
spamassassin.service” (or enable to enable).

Updated patch attached.

-- 
Best regards,
Michael
>From e9e03f66152809485ce6b7b8540f5ac705bdc3bc Mon Sep 17 00:00:00 2001
From: Shawn Landden <shawnland...@gmail.com>
Date: Sat, 13 Jul 2013 21:17:42 -0700
Subject: [PATCH] add systemd spamassassin.service

---
 debian/control              |    2 +-
 debian/rules                |    2 ++
 debian/spamassassin.service |    9 +++++++++
 3 files changed, 12 insertions(+), 1 deletion(-)
 create mode 100644 debian/spamassassin.service

diff --git a/debian/control b/debian/control
index bad3107..2e39a09 100644
--- a/debian/control
+++ b/debian/control
@@ -5,7 +5,7 @@ Maintainer: Noah Meyerhans <no...@debian.org>
 Uploaders: Jesus Climent <jesus.clim...@hispalinux.es>
 Build-Depends: debhelper (>= 7), perl, libssl-dev,
  libhtml-parser-perl (>= 3.24), libnet-dns-perl (>= 0.34), libnetaddr-ip-perl,
- hardening-wrapper
+ hardening-wrapper, dh-systemd
 Standards-Version: 3.9.3
 Homepage: http://www.spamassassin.org/
 Vcs-Svn: svn://svn.debian.org/svn/collab-maint/deb-maint/spamassassin/trunk
diff --git a/debian/rules b/debian/rules
index 98af25f..62317a4 100755
--- a/debian/rules
+++ b/debian/rules
@@ -132,7 +132,9 @@ binary-indep: build-indep install-indep
 	dh_installman -i sa-awl.1p sa-check_spamd.1p
 	dh_installdocs -i
 	dh_installexamples -i
+	dh_systemd_enable
 	dh_installinit -i -- defaults 19 21
+	dh_systemd_start
 	dh_installcron -i
 	dh_installchangelogs Changes -i
 	dh_link -i
diff --git a/debian/spamassassin.service b/debian/spamassassin.service
new file mode 100644
index 0000000..7fcbcb9
--- /dev/null
+++ b/debian/spamassassin.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Perl-based spam filter using text analysis
+
+[Service]
+ExecStart=/usr/sbin/spamd
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target
-- 
1.7.10.4

Reply via email to