From 662b409b72a4794c1fe0a080a0551817663b9bc2 Mon Sep 17 00:00:00 2001 From: Kranium Gikos Date: Mon, 18 Sep 2017 19:56:30 +1000 Subject: [PATCH] influxdb service: fixup postStart script to handle TLS --- nixos/modules/services/databases/influxdb.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/databases/influxdb.nix b/nixos/modules/services/databases/influxdb.nix index 9ffe9fdea2c..eeab33309fd 100644 --- a/nixos/modules/services/databases/influxdb.nix +++ b/nixos/modules/services/databases/influxdb.nix @@ -171,7 +171,7 @@ in if [ "$(id -u)" = 0 ]; then chown -R ${cfg.user}:${cfg.group} ${cfg.dataDir}; fi ''; postStart = mkBefore '' - until ${pkgs.curl.bin}/bin/curl -s -o /dev/null 'http://127.0.0.1${toString configOptions.http.bind-address}'/ping; do + until ${pkgs.curl.bin}/bin/curl -s -o /dev/null ${if configOptions.http.https-enabled then "-k https" else "http"}://127.0.0.1${toString configOptions.http.bind-address}/ping; do sleep 1; done '';