summaryrefslogtreecommitdiff
path: root/bin/extra/ehbvpn
blob: b9a9f458cf57b4db4ba53f90977e6714e36700ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh
if [ "$(id -u)" -ne 0 ]
then
	echo "Please run as root." >&2
	exit 1
fi

which pptpsetup > /dev/null 2>&1 ||
	echo "Please install pptpsetup..." >&2

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 <<EOF
Created tunnel: $name
activate it with
# pon ehb_tunnel debug dump logfd 2 nodetach
EOF