diff --git a/generate-client.sh b/generate-client.sh index 09aea9c..602ffc1 100755 --- a/generate-client.sh +++ b/generate-client.sh @@ -49,4 +49,10 @@ $(cat /etc/openvpn/server/easy-rsa/pki/private/$CLIENT_NAME.key) EOL -echo "Client configuration created: /etc/openvpn/client/$CLIENT_NAME.ovpn" \ No newline at end of file +# Copy the configuration file to the current working directory +WORKING_DIR=$(pwd) +cp /etc/openvpn/client/$CLIENT_NAME.ovpn $WORKING_DIR/ +chmod 644 $WORKING_DIR/$CLIENT_NAME.ovpn + +echo "Client configuration created: /etc/openvpn/client/$CLIENT_NAME.ovpn" +echo "A copy has also been saved to: $WORKING_DIR/$CLIENT_NAME.ovpn" \ No newline at end of file