netdata module: fix ExecStartPost (#181976)
This commit is contained in:
parent
838618957b
commit
3ee8d4c909
1 changed files with 3 additions and 1 deletions
|
@ -201,7 +201,9 @@ in {
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = "${cfg.package}/bin/netdata -P /run/netdata/netdata.pid -D -c /etc/netdata/netdata.conf";
|
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";
|
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;
|
TimeoutStopSec = 60;
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
|
|
Loading…
Reference in a new issue