From 5388d4f020ae71ef0d5cd7f2382e24506b9decd9 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Mon, 18 Sep 2023 22:14:24 +0200 Subject: [ehbvpn] updated to use new vpn --- bin/extra/ehbvpn | 71 ++++++++++++++++++++++++++++++++------------------------ 1 file changed, 41 insertions(+), 30 deletions(-) (limited to 'bin') diff --git a/bin/extra/ehbvpn b/bin/extra/ehbvpn index d3e587c..3a01420 100755 --- a/bin/extra/ehbvpn +++ b/bin/extra/ehbvpn @@ -1,32 +1,43 @@ #!/bin/sh -if [ "$(id -u)" -ne 0 ] -then - echo "Please run as root." >&2 - exit 1 -fi - -if ! which pptpsetup > /dev/null 2>&1 -then - echo "Please install pptpsetup..." >&2 - exit 1 -fi - -name="ehb_tunnel" -ip="193.190.238.38" -read -p "username: " username -stty -echo # disable terminal output -read -p "password: " password -stty echo -echo - -pptpsetup \ - --create "$name" \ - --server "$ip" \ - --username "$username" \ - --password "$password" \ - --encrypt && - cat >&2 <&2 printf "%s" "$@"; head -n 1; } + +email="$(read_line "email: ")" +password="$(read_line "password: ")" + +>&2 printf "%s\n" "/etc/ipsec.conf" + +cat <&2 printf "%s\n" "/etc/ipsec.secrets" + +printf "%s : EAP \"%s\"\n" "$email" "$password" | + tee -a /etc/ipsec.secrets -- cgit v1.2.3