diff options
author | Wout Mertens <Wout.Mertens@gmail.com> | 2022-07-19 06:19:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-19 06:19:18 +0200 |
commit | 3ee8d4c909cae4e2a1b1aac8e5b4a379e79ec3a9 (patch) | |
tree | fb2d344bbe891792957cc287bca8ad3c27abd594 /nixos | |
parent | 838618957bdbb612b4282a4114e045fefb069e35 (diff) |
netdata module: fix ExecStartPost (#181976)
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/monitoring/netdata.nix | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/nixos/modules/services/monitoring/netdata.nix b/nixos/modules/services/monitoring/netdata.nix index c6a3315d40222..03a76cab9f5ee 100644 --- a/nixos/modules/services/monitoring/netdata.nix +++ b/nixos/modules/services/monitoring/netdata.nix @@ -201,7 +201,9 @@ in { serviceConfig = { ExecStart = "${cfg.package}/bin/netdata -P /run/netdata/netdata.pid -D -c /etc/netdata/netdata.conf"; ExecReload = "${pkgs.util-linux}/bin/kill -s HUP -s USR1 -s USR2 $MAINPID"; - ExecStartPost = ''while [ "$(netdatacli ping)" != pong ]; do sleep 0.5; done''; + ExecStartPost = pkgs.writeShellScript "wait-for-netdata-up" '' + while [ "$(${pkgs.netdata}/bin/netdatacli ping)" != pong ]; do sleep 0.5; done + ''; TimeoutStopSec = 60; Restart = "on-failure"; |