diff options
author | lassulus <lassulus@lassul.us> | 2022-12-30 23:37:46 +0100 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2022-12-30 23:37:46 +0100 |
commit | 4591d70e1c4478325f41c57bad8f2eeed4e1d722 (patch) | |
tree | 7a49c53ab7da604a7883186c315de56fd907a49e /lass/3modules | |
parent | 3918ad6cf863646d4f27aabfa9e1cd28a612df47 (diff) |
l sync-containers3: don't start if consul fails
Diffstat (limited to 'lass/3modules')
-rw-r--r-- | lass/3modules/sync-containers3.nix | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lass/3modules/sync-containers3.nix b/lass/3modules/sync-containers3.nix index 16e04d743..1a006835d 100644 --- a/lass/3modules/sync-containers3.nix +++ b/lass/3modules/sync-containers3.nix @@ -135,7 +135,8 @@ in { ;; 200) # echo 'got 200 from kv, will check payload' - export payload=$(consul kv get containers/${ctr.name}) + payload=$(consul kv get containers/${ctr.name}) || continue + export payload if [ "$(jq -rn 'env.payload | fromjson.host')" = '${config.networking.hostName}' ]; then # echo 'we are the host, trying to reach container' if $(retry -t 10 -d 10 -- /run/wrappers/bin/ping -q -c 1 ${ctr.name}.r > /dev/null); then |