[Dovecot] [PATCH] Add Install section to dovecot.service, so it can be used independently from dovecot.socket
Mike Kazantsev
mk.fraggod at gmail.com
Fri Feb 18 14:22:13 EET 2011
Good day,
Dovecot includes nice unit files for systemd, but I've noticed that
"systemctl enable dovecot.service" fails because service file does not
include Install section.
I assume that is because there's a .socket file, but there might be
reasons when you want to enable it as a service.
In my case it's one of the main services on the machine, so I'd like to
see whether it's started correctly in systemctl after boot. And of
course I don't want it to be killed due to "no connections timeout" at
any given time.
Plus, it provides authentication info for postfix daemon running on the
same machine, and dovecot.socket does not handle this case.
Following patch allows dovecot.service to be enabled via usual
systemctl command.
From e04611738edcc9245ca2a7c30587ed13a1cdb1aa Mon Sep 17 00:00:00 2001
From: Mike Kazantsev (sacrilege) <mk.fraggod at gmail.com>
Date: Fri, 18 Feb 2011 17:00:17 +0500
Subject: [PATCH] systemd service: added [Install] section, so it can be used independently from dovecot.socket
---
dovecot.service.in | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/dovecot.service.in b/dovecot.service.in
index db03946..f248709 100644
--- a/dovecot.service.in
+++ b/dovecot.service.in
@@ -6,3 +6,6 @@ After=local-fs.target network.target
Type=simple
ExecStart=@sbindir@/dovecot -F
NonBlocking=yes
+
+[Install]
+WantedBy=multi-user.target
--
1.7.4.1
--
Mike Kazantsev // fraggod.net
More information about the dovecot
mailing list