2018-03-01 13:04:22 +00:00
|
|
|
diff -up dovecot-2.3.0.1/dovecot-init.service.initbysystemd dovecot-2.3.0.1/dovecot-init.service
|
|
|
|
--- dovecot-2.3.0.1/dovecot-init.service.initbysystemd 2018-03-01 10:38:22.059716008 +0100
|
|
|
|
+++ dovecot-2.3.0.1/dovecot-init.service 2018-03-01 10:38:22.059716008 +0100
|
2015-12-08 18:07:07 +00:00
|
|
|
@@ -0,0 +1,18 @@
|
|
|
|
+[Unit]
|
|
|
|
+Description=One-time Dovecot init service
|
|
|
|
+ConditionPathExists=|!/var/lib/dovecot/ssl-parameters.dat
|
|
|
|
+ConditionPathExists=|!/etc/pki/dovecot/certs/dovecot.pem
|
|
|
|
+
|
|
|
|
+[Service]
|
|
|
|
+Type=oneshot
|
|
|
|
+RemainAfterExit=no
|
|
|
|
+ExecStart=/bin/sh -c '\
|
|
|
|
+if [ ! -f /etc/pki/dovecot/certs/dovecot.pem ]; \
|
|
|
|
+then\
|
|
|
|
+ SSLDIR=/etc/pki/dovecot/ OPENSSLCONFIG=/etc/pki/dovecot/dovecot-openssl.cnf /usr/libexec/dovecot/mkcert.sh /dev/null 2>&1;\
|
|
|
|
+fi;\
|
|
|
|
+if [ ! -f /var/lib/dovecot/ssl-parameters.dat ]; \
|
|
|
|
+then\
|
|
|
|
+ /usr/libexec/dovecot/ssl-params >/dev/null 2>&1; \
|
|
|
|
+fi'
|
|
|
|
+
|
2018-03-01 13:04:22 +00:00
|
|
|
diff -up dovecot-2.3.0.1/dovecot.service.in.initbysystemd dovecot-2.3.0.1/dovecot.service.in
|
|
|
|
--- dovecot-2.3.0.1/dovecot.service.in.initbysystemd 2018-03-01 10:38:22.060716016 +0100
|
|
|
|
+++ dovecot-2.3.0.1/dovecot.service.in 2018-03-01 10:40:45.524901319 +0100
|
|
|
|
@@ -8,7 +8,8 @@
|
2015-12-08 18:07:07 +00:00
|
|
|
Description=Dovecot IMAP/POP3 email server
|
|
|
|
Documentation=man:dovecot(1)
|
|
|
|
Documentation=http://wiki2.dovecot.org/
|
|
|
|
-After=local-fs.target network-online.target
|
|
|
|
+After=local-fs.target network-online.target dovecot-init.service
|
|
|
|
+Requires=dovecot-init.service
|
|
|
|
|
|
|
|
[Service]
|
2018-03-01 13:04:22 +00:00
|
|
|
Type=simple
|
|
|
|
diff -up dovecot-2.3.0.1/Makefile.am.initbysystemd dovecot-2.3.0.1/Makefile.am
|
|
|
|
--- dovecot-2.3.0.1/Makefile.am.initbysystemd 2018-02-28 15:28:57.000000000 +0100
|
|
|
|
+++ dovecot-2.3.0.1/Makefile.am 2018-03-01 10:38:22.060716016 +0100
|
|
|
|
@@ -63,9 +63,10 @@ if HAVE_SYSTEMD
|
2015-12-08 18:07:07 +00:00
|
|
|
|
|
|
|
systemdsystemunit_DATA = \
|
|
|
|
dovecot.socket \
|
|
|
|
- dovecot.service
|
|
|
|
+ dovecot.service \
|
|
|
|
+ dovecot-init.service
|
|
|
|
else
|
|
|
|
-EXTRA_DIST += dovecot.socket dovecot.service.in
|
|
|
|
+EXTRA_DIST += dovecot.socket dovecot.service.in dovecot-init.service
|
|
|
|
endif
|
|
|
|
|
|
|
|
install-exec-hook:
|