diff options
| author | Florian Klink <flokli@flokli.de> | 2024-04-27 00:46:11 +0300 |
|---|---|---|
| committer | Florian Klink <flokli@flokli.de> | 2024-05-12 18:27:02 +0300 |
| commit | 0244a8d5d77102d96496fc624ecb2a441ab6d441 (patch) | |
| tree | 114656782a1177451c3e66d5bc149c459a6c238d /pkgs/development/python-modules/cppheaderparser | |
| parent | fbc8eb34d0083d35a227f32fbfcf7e49b60e533c (diff) | |
nixos/caddy: don't set ExecReload if enableReload is disabled
Otherwise, setting services.caddy.enableReload to false fails in a very bad fashion:
The reload command still gets executed, but fails:
```
Apr 26 21:23:01 n1-rk1 systemd[1]: Reloading Caddy...
Apr 26 21:23:01 n1-rk1 caddy[70793]: {"level":"info","ts":1714166581.733018,"msg":"using provided configuration","config_file":"/etc/caddy/caddy_config","config_adapter":"caddyfile"}
Apr 26 21:23:01 n1-rk1 caddy[70793]: {"level":"warn","ts":1714166581.7353032,"msg":"Caddyfile input is not formatted; run 'caddy fmt --overwrite' to fix inconsistencies","adapter":"caddyfile","file":"/etc/caddy/caddy_config","line":3}
Apr 26 21:23:01 n1-rk1 caddy[70793]: Error: sending configuration to instance: performing request: Post "http://localhost:2019/load": dial tcp [::1]:2019: connect: connection refused
Apr 26 21:23:01 n1-rk1 systemd[1]: caddy.service: Control process exited, code=exited, status=1/FAILURE
Apr 26 21:23:01 n1-rk1 systemd[1]: Reload failed for Caddy.
```
… and the server is not restarted either, as a ExecReload= command is
specified.
Fix this, by only setting ExecReload if the reload exists.
The first empty string is still necessary to reset the old option.
Diffstat (limited to 'pkgs/development/python-modules/cppheaderparser')
0 files changed, 0 insertions, 0 deletions
