From 6ab9c485e63adb58232f17f2b674a5b342168f92 Mon Sep 17 00:00:00 2001 From: fruchti Date: Thu, 13 Apr 2023 20:53:13 +0200 Subject: [PATCH] Emitter: Ping remote backup server, fail early --- hosts/Emitter.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hosts/Emitter.nix b/hosts/Emitter.nix index a19034c..5c23f64 100644 --- a/hosts/Emitter.nix +++ b/hosts/Emitter.nix @@ -97,6 +97,8 @@ mv $out/sbin/burp $out/sbin/burp-untunneled cat > $out/sbin/burp <<-EOF #!/${pkgs.bash}/bin/bash + set -e + ${pkgs.unixtools.ping}/bin/ping -c1 rupert.gvfr.de >/dev/null ${pkgs.openssh}/bin/ssh -i /secrets/id_burp_remote -o IdentitiesOnly=yes -o ExitOnForwardFailure=yes -L 4971:localhost:4971 burp-remote@rupert.gvfr.de -f true $out/sbin/burp-untunneled \$@ EOF