diff options
author | lassulus <lassulus@lassul.us> | 2019-03-23 16:04:22 +0100 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2019-03-23 16:04:22 +0100 |
commit | 86150b31f20772c761dac2ce76862928bcc07537 (patch) | |
tree | d4d8423cbfe80d39daad2aa8d32a06b5af7eaa3d /krebs | |
parent | 0bb9321d1b979f64703c22fa6c25a46776da50af (diff) |
syncthing: wait for service startup
Diffstat (limited to 'krebs')
-rw-r--r-- | krebs/3modules/syncthing.nix | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/krebs/3modules/syncthing.nix b/krebs/3modules/syncthing.nix index 485dd3991..e7f95f7fc 100644 --- a/krebs/3modules/syncthing.nix +++ b/krebs/3modules/syncthing.nix @@ -28,6 +28,8 @@ let updateConfig = pkgs.writeDash "merge-syncthing-config" '' set -efu + # wait for service to restart + ${pkgs.untilport}/bin/untilport localhost 8384 API_KEY=$(${getApiKey}) CFG=$(${pkgs.curl}/bin/curl -Ss -H "X-API-Key: $API_KEY" localhost:8384/rest/system/config) echo "$CFG" | ${pkgs.jq}/bin/jq -s '.[] * { |