]> git.proxmox.com Git - pmg-api.git/commitdiff
pmgsync.service: order before postfix@.service
authorStoiko Ivanov <s.ivanov@proxmox.com>
Thu, 23 Apr 2020 08:21:16 +0000 (10:21 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 23 Apr 2020 11:23:30 +0000 (13:23 +0200)
pmgsync.service updates the database-schema (pmgdb init) and generates and
updates configuration files from the templates and reloads the respective
services.

When first booting up after installation, it adapts the config from what's
shipped in the default debian packages for the first time.

The postfix configuration is also rendered, including settings where a
restart is necessary (listening on the internal port (26)).

While the unit already starts before postfix.service, the postfix service
files are designed to start multiple instances of postfix via instantiation
(by default postfix@-.service is the single instance (and the service file
which actually starts postfix)).

Since both pmgsync and postfix@- have no ordering relation between them, they
are started in parallel, which leads to postfix starting with the stock config
upon first boot.

Tested by running the installer in debug mode and applying this patch in the
last debug shell.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
debian/pmgsync.service

index 3410e3ad63f13a2cfaddc868163aac0f9592a27a..8d0ee9190fa9fc5b6d5a696dd16fb92b62c43818 100644 (file)
@@ -8,6 +8,7 @@ After=remote-fs.target
 Wants=postgresql.service
 After=postgresql.service
 Before=postfix.service
+Before=postfix@.service
 Before=clamav-daemon.service
 Before=clamav-freshclam.service
 Before=pmgdaemon.service