1
0
mirror of https://github.com/Nyr/openvpn-install.git synced 2024-11-24 05:56:08 +03:00

Check if the script is running on a Debian-based system before starting

Fixed some spacing too
This commit is contained in:
Nyr 2014-03-12 21:06:57 +01:00
parent 6d89279940
commit a69dae3021

View File

@ -18,6 +18,12 @@ if [ ! -e /dev/net/tun ]; then
fi fi
if [ ! -e /etc/debian_version ]; then
echo "Looks like you aren't running this installer on a Debian-based system"
exit
fi
# Try to get our IP from the system and fallback to the Internet. # Try to get our IP from the system and fallback to the Internet.
# I do this to make the script compatible with NATed servers (lowendspirit.com) # I do this to make the script compatible with NATed servers (lowendspirit.com)
# and to avoid getting an IPv6. # and to avoid getting an IPv6.
@ -39,7 +45,7 @@ if [ -e /etc/openvpn/server.conf ]; then
echo "3) Remove OpenVPN" echo "3) Remove OpenVPN"
echo "4) Exit" echo "4) Exit"
echo "" echo ""
read -p "Select an option [1-4]:" option read -p "Select an option [1-4]: " option
case $option in case $option in
1) 1)
echo "" echo ""
@ -116,7 +122,7 @@ else
echo "" echo ""
echo "Do you want OpenVPN to be available at port 53 too?" echo "Do you want OpenVPN to be available at port 53 too?"
echo "This can be useful to connect under restrictive networks" echo "This can be useful to connect under restrictive networks"
read -p "Listen at port 53 [y/n]:" -e -i n ALTPORT read -p "Listen at port 53 [y/n]: " -e -i n ALTPORT
echo "" echo ""
echo "Finally, tell me your name for the client cert" echo "Finally, tell me your name for the client cert"
echo "Please, use one word only, no special characters" echo "Please, use one word only, no special characters"