Page MenuHomeDevCentral

Start Dovecot on boot
ClosedPublic

Authored by DorianWinty on Aug 9 2024, 19:25.
Tags
None
Referenced Files
F3711575: D3413.diff
Sun, Nov 3, 03:48
Unknown Object (File)
Sun, Oct 27, 11:44
Unknown Object (File)
Sun, Oct 27, 11:32
Unknown Object (File)
Tue, Oct 22, 05:33
Unknown Object (File)
Tue, Oct 22, 05:32
Unknown Object (File)
Tue, Oct 22, 04:48
Unknown Object (File)
Tue, Oct 22, 04:28
Unknown Object (File)
Sat, Oct 12, 08:59
Subscribers
None

Details

Summary

Ref T1931

Test Plan

Deploy to Hervil

Diff Detail

Repository
rOPS Nasqueron Operations
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.