From 3b629a0f93c2e28723eb646716c756b196e5b12f Mon Sep 17 00:00:00 2001 From: Robin Stumm Date: Fri, 24 Sep 2021 20:33:07 +0200 Subject: [PATCH] vulnix module: more human-readable code style --- modules/vulnix.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/vulnix.nix b/modules/vulnix.nix index f75f61d1..d3dd0053 100644 --- a/modules/vulnix.nix +++ b/modules/vulnix.nix @@ -193,9 +193,9 @@ in { NOMAD_TOKEN=$(vault read -field secret_id nomad/creds/admin) sleep 5s # let nomad token be propagated to come into effect - [[ -f $STATE_DIRECTORY/index ]] || { + if [[ ! -f $STATE_DIRECTORY/index ]]; then printf '%d' 0 > $STATE_DIRECTORY/index - } + fi # TODO If the NOMAD_TOKEN expires the service would probably exit uncleanly and restart. Make it a clean restart.