From: Aki Tuomi Date: Thu, 18 Feb 2016 17:27:13 +0000 (+0200) Subject: dovecot: improve systemd support X-Git-Tag: 2.2.22.rc1~160 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=53cc71cae88ee81fd7eae47aed743496f8c884a2;p=thirdparty%2Fdovecot%2Fcore.git dovecot: improve systemd support --- diff --git a/Makefile.am b/Makefile.am index 40ecc45094..67cbd5cc6c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -47,7 +47,7 @@ dovecot-config: dovecot-config.in Makefile if HAVE_SYSTEMD %.service: %.service.in - $(AM_V_GEN)sed -e 's,@sbindir\@,$(sbindir),g' $< > $@ + $(AM_V_GEN)sed -e 's,@sbindir\@,$(sbindir),g' -e 's,@bindir\@,$(bindir),g' -e 's,@statedir\@,$(statedir),g' $< > $@ systemdsystemunit_DATA = \ dovecot.socket \ diff --git a/dovecot.service.in b/dovecot.service.in index b647b975f4..9b42b5dc53 100644 --- a/dovecot.service.in +++ b/dovecot.service.in @@ -23,9 +23,14 @@ Documentation=http://wiki2.dovecot.org/ After=local-fs.target network.target [Service] -Type=simple -ExecStart=@sbindir@/dovecot -F $OPTIONS -ExecReload=@sbindir@/dovecot reload +Type=forking +ExecStart=@sbindir@/dovecot +PIDFile=@statedir@dovecot/master.pid +ExecReload=@bindir@/doveadm reload +ExecStop=@bindir@/doveadm stop +ProtectSystem=full +ProtectHome=false +PrivateTmp=true NonBlocking=yes [Install]