From d99ca4324c1e9a49fe74138712cc68d4ca8f1f5b Mon Sep 17 00:00:00 2001 From: charleswrayjr Date: Mon, 8 Sep 2025 21:10:27 -0500 Subject: [PATCH] Cleaning up the revoke client function and starting on the create client function in the vpn controller. --- src/controllers/vpn.controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/vpn.controller.js b/src/controllers/vpn.controller.js index a90b2fe..6b62f14 100644 --- a/src/controllers/vpn.controller.js +++ b/src/controllers/vpn.controller.js @@ -58,7 +58,7 @@ module.exports = { conn.on( 'ready', () => { const commands = [ `cd /etc/openvpn/easy-rsa`, - `./easyrsa --batch build-client-full ${clientName} nopass`, + `sudo ./easyrsa --batch build-client-full ${clientName} nopass`, staticIp ? `echo "ifconfig-push ${staticIp} 255.255.255.0" | tee /etc/openvpn/ccd/${clientName}` : 'true', `cp /etc/openvpn/client-template.txt /home/charles/clients/${clientName}.ovpn`, `sed -i "s/CLIENT_NAME/${clientName}/" /home/charles/clients/${clientName}.ovpn`, -- 2.43.0