1
0
mirror of https://github.com/Nyr/openvpn-install.git synced 2024-11-24 14:06:07 +03:00
This commit is contained in:
Ijor Tengab 2023-11-09 11:33:11 -06:00 committed by GitHub
commit 750dd202b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -86,6 +86,7 @@ TUN needs to be enabled before running this installer."
fi
new_client () {
mkdir -p /etc/openvpn/client
# Generates the custom client.ovpn
{
cat /etc/openvpn/server/client-common.txt
@ -101,7 +102,7 @@ new_client () {
echo "<tls-crypt>"
sed -ne '/BEGIN OpenVPN Static key/,$ p' /etc/openvpn/server/tc.key
echo "</tls-crypt>"
} > ~/"$client".ovpn
} > /etc/openvpn/client/"$client".ovpn
}
if [[ ! -e /etc/openvpn/server/server.conf ]]; then
@ -437,7 +438,7 @@ verb 3" > /etc/openvpn/server/client-common.txt
echo
echo "Finished!"
echo
echo "The client configuration is available in:" ~/"$client.ovpn"
echo "The client configuration is available in:" /etc/openvpn/client/"$client".ovpn
echo "New clients can be added by running this script again."
else
clear
@ -469,7 +470,7 @@ else
# Generates the custom client.ovpn
new_client
echo
echo "$client added. Configuration available in:" ~/"$client.ovpn"
echo "$client added. Configuration available in:" /etc/openvpn/client/"$client".ovpn
exit
;;
2)