Move newClient and installLocalDNS to functions
This commit is contained in:
parent
243de3a4c4
commit
3284a5f2f5
1 changed files with 5 additions and 5 deletions
|
|
@ -21,7 +21,7 @@ function tunAvailable () {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkOS() {
|
function checkOS () {
|
||||||
if [[ -e /etc/debian_version ]]; then
|
if [[ -e /etc/debian_version ]]; then
|
||||||
OS="debian"
|
OS="debian"
|
||||||
# Getting the version number, to verify that a recent version of OpenVPN is available
|
# Getting the version number, to verify that a recent version of OpenVPN is available
|
||||||
|
|
@ -78,10 +78,6 @@ function initialCheck () {
|
||||||
checkOS
|
checkOS
|
||||||
}
|
}
|
||||||
|
|
||||||
# Main
|
|
||||||
|
|
||||||
initialCheck
|
|
||||||
|
|
||||||
function newclient () {
|
function newclient () {
|
||||||
echo ""
|
echo ""
|
||||||
echo "Do you want to protect the configuration file with a password?"
|
echo "Do you want to protect the configuration file with a password?"
|
||||||
|
|
@ -221,6 +217,10 @@ private-address: ::ffff:0:0/96' > /etc/unbound/openvpn.conf
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Main
|
||||||
|
|
||||||
|
initialCheck
|
||||||
|
|
||||||
# Get Internet network interface with default route
|
# Get Internet network interface with default route
|
||||||
NIC=$(ip -4 route ls | grep default | grep -Po '(?<=dev )(\S+)' | head -1)
|
NIC=$(ip -4 route ls | grep default | grep -Po '(?<=dev )(\S+)' | head -1)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue