From e87c356c8104c7c016c41fe477d0654056847343 Mon Sep 17 00:00:00 2001 From: Arpit Chakladar Date: Mon, 13 Apr 2026 16:38:55 +0530 Subject: injecting variables into scripts so that they use the actual path of th binaries of the packages --- modules/scripts/vpn-connect.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'modules/scripts/vpn-connect.sh') diff --git a/modules/scripts/vpn-connect.sh b/modules/scripts/vpn-connect.sh index 0366725..885796a 100644 --- a/modules/scripts/vpn-connect.sh +++ b/modules/scripts/vpn-connect.sh @@ -24,11 +24,10 @@ fi # Selection logic if [[ "$REFRESH" == true ]]; then - # These variables ($FZF_BIN, etc) are provided by the Nix wrapper below - CRED=$(find "$CREDS_DIR" -type f | "$FZF_BIN" --prompt="Select Credentials > ") + CRED=$(find "$CREDS_DIR" -type f | "$FZF" --prompt="Select Credentials > ") [ -z "$CRED" ] && exit 1 - SERVER=$(find "$SERVERS_DIR" -type f \( -name "*.conf" -o -name "*.ovpn" \) | "$FZF_BIN" --prompt="Select VPN Server > ") + SERVER=$(find "$SERVERS_DIR" -type f \( -name "*.conf" -o -name "*.ovpn" \) | "$FZF" --prompt="Select VPN Server > ") [ -z "$SERVER" ] && exit 1 echo "CRED=\"$CRED\"" > "$CACHE_FILE" @@ -49,10 +48,10 @@ sed -e '/up \/etc\/openvpn\/update-resolv-conf/d' \ trap 'rm -f "$TMP_CONF"' EXIT # Execute openvpn using the temporary file -sudo "$OPENVPN_BIN" \ +sudo "$OPENVPN" \ --config "$TMP_CONF" \ --auth-user-pass "$CRED" \ --script-security 2 \ - --up "$RESOLVED_BIN" \ - --down "$RESOLVED_BIN" \ + --up "$SYSTEMD_RESOLVED" \ + --down "$SYSTEMD_RESOLVED" \ --down-pre -- cgit v1.2.3