mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-10-14 16:40:09 +03:00
0244a8d5d7
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. |
||
---|---|---|
.. | ||
config | ||
hardware | ||
i18n/input-method | ||
image | ||
installer | ||
misc | ||
profiles | ||
programs | ||
security | ||
services | ||
system | ||
tasks | ||
testing | ||
virtualisation | ||
module-list.nix | ||
rename.nix |