1
0
mirror of https://github.com/Nyr/openvpn-install.git synced 2024-12-01 01:16:05 +03:00

Moving output directory of client config.

This commit is contained in:
IjorTengab 2021-03-07 02:43:42 +07:00
parent cb8730b621
commit 69e7f8fea9

View File

@ -80,6 +80,7 @@ TUN needs to be enabled before running this installer."
fi fi
new_client () { new_client () {
mkdir -p /etc/openvpn/client
# Generates the custom client.ovpn # Generates the custom client.ovpn
{ {
cat /etc/openvpn/server/client-common.txt cat /etc/openvpn/server/client-common.txt
@ -95,7 +96,7 @@ new_client () {
echo "<tls-crypt>" echo "<tls-crypt>"
sed -ne '/BEGIN OpenVPN Static key/,$ p' /etc/openvpn/server/tc.key sed -ne '/BEGIN OpenVPN Static key/,$ p' /etc/openvpn/server/tc.key
echo "</tls-crypt>" echo "</tls-crypt>"
} > ~/"$client".ovpn } > /etc/openvpn/client/"$client".ovpn
} }
if [[ ! -e /etc/openvpn/server/server.conf ]]; then if [[ ! -e /etc/openvpn/server/server.conf ]]; then
@ -426,7 +427,7 @@ verb 3" > /etc/openvpn/server/client-common.txt
echo echo
echo "Finished!" echo "Finished!"
echo 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." echo "New clients can be added by running this script again."
else else
clear clear
@ -458,7 +459,7 @@ else
# Generates the custom client.ovpn # Generates the custom client.ovpn
new_client new_client
echo echo
echo "$client added. Configuration available in:" ~/"$client.ovpn" echo "$client added. Configuration available in:" /etc/openvpn/client/"$client".ovpn
exit exit
;; ;;
2) 2)