File tree Expand file tree Collapse file tree
cmdeploy/src/cmdeploy/external Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -63,11 +63,5 @@ def activate(self):
6363 restarted = self .need_restart ,
6464 daemon_reload = self .need_restart ,
6565 )
66- # Trigger the oneshot service so services pick up the current cert.
67- # The path unit handles future changes via inotify.
68- systemd .service (
69- name = "Reload TLS services for current certificate" ,
70- service = "tls-cert-reload.service" ,
71- running = True ,
72- daemon_reload = False ,
73- )
66+ # No explicit reload needed here: dovecot/nginx read the cert
67+ # on startup, and the .path watcher handles live changes.
Original file line number Diff line number Diff line change 11# Watch the TLS certificate file for changes.
22# When the cert is updated (e.g. renewed by an external process),
3- # this triggers tls-cert-reload.service to restart the affected services.
3+ # this triggers tls-cert-reload.service to reload the affected services.
4+ #
5+ # NOTE: changes to the certificates are not detected if they cross bind-mount boundaries.
6+ # After cert renewal, you must then trigger the reload explicitly:
7+ # systemctl start tls-cert-reload.service
48[Unit]
59Description=Watch TLS certificate for changes
610
Original file line number Diff line number Diff line change @@ -11,5 +11,5 @@ Description=Reload TLS services after certificate change
1111
1212[Service]
1313Type =oneshot
14- ExecStart =/bin/systemctl reload dovecot
15- ExecStart =/bin/systemctl reload nginx
14+ ExecStart =/bin/systemctl try- reload-or-restart dovecot
15+ ExecStart =/bin/systemctl try- reload-or-restart nginx
Original file line number Diff line number Diff line change @@ -229,7 +229,11 @@ The deploy will verify that both files exist on the server.
229229 You are responsible for certificate renewal.
230230 When the certificate file changes on disk,
231231 all relay services pick up the new certificate automatically
232- (via a systemd path watcher installed during deploy).
232+ via a systemd path watcher installed during deploy.
233+ The watcher uses inotify, which does not cross bind-mount boundaries.
234+ If you use such a setup, you must trigger the reload explicitly after renewal::
235+
236+ systemctl start tls-cert-reload.service
233237
234238
235239Migrating to a new build machine
You can’t perform that action at this time.
0 commit comments