treewide: curl: exit with error status on HTTP errors

This makes scripts fail early on request errors.
Previously, curl exited with status 0 when enountering HTTP error status
codes.
`-fsS` equals `--fail --silent --show-error`.
This commit is contained in:
Erik Arvstedt
2022-05-17 13:18:38 +02:00
parent 63b3eec9cd
commit 84fe731c94
4 changed files with 8 additions and 8 deletions

View File

@@ -234,7 +234,7 @@ in {
RestartSec = "10s";
ReadWritePaths = [ cfg.dataDir ];
ExecStartPost = let
curl = "${pkgs.curl}/bin/curl -s --show-error --cacert ${cfg.certPath}";
curl = "${pkgs.curl}/bin/curl -fsS --cacert ${cfg.certPath}";
restUrl = "https://${nbLib.addressWithPort cfg.restAddress cfg.restPort}/v1";
in
# Setting macaroon permissions for other users needs root permissions