From 154d90006d53bb8243a7c1ba7dd7ec29cc7cb274 Mon Sep 17 00:00:00 2001 From: Stefan Junker Date: Mon, 6 Dec 2021 21:38:27 +0100 Subject: [PATCH] justfile: complete the verify-n-unlock recipe --- Justfile | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Justfile b/Justfile index 14c599f..aa28c8f 100755 --- a/Justfile +++ b/Justfile @@ -212,7 +212,19 @@ disk-umount dir: disk-install dir: _render_templates just -v _device diskInstall {{dir}} + verify-n-unlock sshserver attempts="10": + #!/usr/bin/env bash + set -e + env \ + GETPW="just _get_pass_entry Infrastructure/VPS/{{sshserver}} DRIVE_PW" \ + SSHOPTS="$(just _get_pass_entry Infrastructure/VPS/{{sshserver}} SSHOPTS)" \ + VNCSOCK="$(just _get_pass_entry Infrastructure/VPS/{{sshserver}} VNCSOCK)" \ + VNCPW="$(just _get_pass_entry Infrastructure/VPS/{{sshserver}} VNCPW)" \ + \ + just _verify-n-unlock {{sshserver}} {{attempts}} + +_verify-n-unlock sshserver attempts: #!/usr/bin/env bash set -e : ${VNCSOCK:?VNCSOCK must be set}