]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
dovecot: improve systemd support
authorAki Tuomi <aki.tuomi@dovecot.net>
Thu, 18 Feb 2016 17:27:13 +0000 (19:27 +0200)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 18 Feb 2016 19:05:01 +0000 (21:05 +0200)
Makefile.am
dovecot.service.in

index 40ecc45094763f711f13c9a1f71931702ca3ab9e..67cbd5cc6c7558f44199be0216f95c6d86312067 100644 (file)
@@ -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 \
index b647b975f41244fc6bdc759c89308221538d4eb6..9b42b5dc53ee0f33d156e524b989bc4215e1a1d7 100644 (file)
@@ -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]