mirror of
https://github.com/angristan/openvpn-install.git
synced 2025-12-19 10:17:01 +01:00
Merge 0092c43874 into e1f19e0f24
This commit is contained in:
@@ -1137,13 +1137,13 @@ function newClient() {
|
||||
# if not, use SUDO_USER
|
||||
if [ "${SUDO_USER}" == "root" ]; then
|
||||
# If running sudo as root
|
||||
homeDir="/root"
|
||||
homeDir="/etc/openvpn/client/"
|
||||
else
|
||||
homeDir="/home/${SUDO_USER}"
|
||||
fi
|
||||
else
|
||||
# if not SUDO_USER, use /root
|
||||
homeDir="/root"
|
||||
homeDir="/etc/openvpn/client"
|
||||
fi
|
||||
|
||||
# Determine if we use tls-auth or tls-crypt
|
||||
@@ -1181,9 +1181,11 @@ function newClient() {
|
||||
echo "</tls-auth>"
|
||||
;;
|
||||
esac
|
||||
# $homeDir
|
||||
} >>"$homeDir/$CLIENT.ovpn"
|
||||
|
||||
echo ""
|
||||
# $homeDir
|
||||
echo "The configuration file has been written to $homeDir/$CLIENT.ovpn."
|
||||
echo "Download the .ovpn file and import it in your OpenVPN client."
|
||||
|
||||
|
||||
Reference in New Issue
Block a user