From 9fc465f6379ee63ecdfb0e998d6e1b05df548c0c Mon Sep 17 00:00:00 2001 From: Master Date: Sat, 22 Mar 2025 19:03:44 +0000 Subject: [PATCH] Copy client conf to work dir --- generate-client.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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