From 89f939351fa1643a01f4b13dbcc2bcbbac150b32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zsolt=20Alf=C3=B6ldi?= Date: Sun, 26 Oct 2025 02:51:14 +0200 Subject: [PATCH] test --- nix.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/nix.sh b/nix.sh index 06f42a9..26482aa 100644 --- a/nix.sh +++ b/nix.sh @@ -3,11 +3,18 @@ set -e -u -o pipefail DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null && pwd)" VPN=vpn0 +: ${1:?Missing decrypt pass} +: ${2:?Missing topt but needed} + dot_env_secret=$(echo 'U2FsdGVkX1+ZpYMKJgqLZC7uedR4GhfB6/8Q+xdq0rH9v2S/pNTBBpdjlS/Fy5eNRsMGRSYf/HoZNihIYiAskKOY7mg6+t5vRUXWh73BQHuUVD2uAUc5npgP/Lmyn2wR2qWoBfTToKeu0nI5Gh7VQw==' | \ openssl enc -aes-256-cbc -pbkdf2 -d -a -A -pass pass:$1) export $( echo $dot_env_secret | grep "=" | grep -v "#" | xargs ) +: ${VPN_PEM_PASS:?Missing but needed} +: ${VPN_USER:?Missing but needed} +: ${VPN_USER_PASS:?Missing but needed} + expect $DIR/vpn.exp $VPN_PEM_PASS $VPN_USER $VPN_USER_PASS $2 sudo ip route delete 10.0.0.0/8 dev $VPN metric 50 || true