Page MenuHomeDevCentral

Start Dovecot on boot
ClosedPublic

Authored by DorianWinty on Aug 9 2024, 19:25.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 23, 09:39
Unknown Object (File)
Sat, Nov 23, 08:32
Unknown Object (File)
Sat, Nov 23, 03:36
Unknown Object (File)
Fri, Nov 22, 17:27
Unknown Object (File)
Fri, Nov 22, 10:53
Unknown Object (File)
Fri, Nov 22, 10:17
Unknown Object (File)
Fri, Nov 22, 04:16
Unknown Object (File)
Thu, Nov 21, 18:23
Subscribers
None

Details

Summary

Ref T1931

Test Plan

Deploy to Hervil

Diff Detail

Repository
rOPS Nasqueron Operations
Lint
Lint Passed
Unit
No Test Coverage
Branch
autoStartDovecot
Build Status
Buildable 5440
Build 5721: arc lint + arc unit

Event Timeline

DorianWinty created this revision.
dereckson retitled this revision from Configure system to start dovecot on boot to Start Dovecot on boot.Aug 10 2024, 10:32
dereckson edited the test plan for this revision. (Show Details)

Use of enable: True on FreeBSD is a drift from our standard practice

When run on FreeBSD, the service state module will call the freebsdservice execution module.

Salt documentation in execution module freebsdservice states for freebsdservice.enable:

config/etc/rc.conf (read probably config)
Config file for managing service. If config value is empty string, then /etc/rc.conf.d/<service> used. See man rc.conf(5) for details.
Also service.config variable can be used to change default.

So that's documented to create - correctly - /etc/rc.conf.d/dovecot and write dovecot_enable="YES" there.

Everywhere else in the rOPS code, we manually create that file. The only value added to the manual operation is when we need to customize other values than only _enable. As long as it's not the case for Dovecot, the use of enable is perhaps A LOT simpler than file.managed + a new template.

dereckson added inline comments.
roles/mailserver/dovecot/init.sls
14

Service should be enabled and started AFTER the configuration.

If not, it will be launched with default config or for Dovecot without config at all and so will fail.

So we can move this section at the end of the file.

This revision is now accepted and ready to land.Aug 10 2024, 21:35
This revision was automatically updated to reflect the committed changes.