Fix auto-install
This commit is contained in:
parent
7ba776ce7a
commit
52d67286de
8
openvpn-install.sh
Normal file → Executable file
8
openvpn-install.sh
Normal file → Executable file
@ -572,11 +572,11 @@ function installOpenVPN () {
|
|||||||
# Behind NAT, we'll default to the publicly reachable IPv4.
|
# Behind NAT, we'll default to the publicly reachable IPv4.
|
||||||
PUBLIC_IPV4=$(curl ifconfig.co)
|
PUBLIC_IPV4=$(curl ifconfig.co)
|
||||||
ENDPOINT=${ENDPOINT:-PUBLIC_IPV4}
|
ENDPOINT=${ENDPOINT:-PUBLIC_IPV4}
|
||||||
else
|
|
||||||
# Run setup questions first
|
|
||||||
installQuestions
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Run setup questions first, and set other variales if auto-install
|
||||||
|
installQuestions
|
||||||
|
|
||||||
# Get the "public" interface from the default route
|
# Get the "public" interface from the 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)
|
||||||
|
|
||||||
@ -1039,6 +1039,8 @@ function newClient () {
|
|||||||
echo ""
|
echo ""
|
||||||
echo "Client $CLIENT added, the configuration file is available at $homeDir/$CLIENT.ovpn."
|
echo "Client $CLIENT added, the configuration file is available at $homeDir/$CLIENT.ovpn."
|
||||||
echo "Download the .ovpn file and import it in your OpenVPN client."
|
echo "Download the .ovpn file and import it in your OpenVPN client."
|
||||||
|
|
||||||
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
function revokeClient () {
|
function revokeClient () {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user