From: charleswrayjr Date: Tue, 9 Sep 2025 02:10:27 +0000 (-0500) Subject: Cleaning up the revoke client function and starting on the create client function... X-Git-Url: https://git.phasecustomsoft.com/logo192.png?a=commitdiff_plain;h=d99ca4324c1e9a49fe74138712cc68d4ca8f1f5b;p=phs-api.git Cleaning up the revoke client function and starting on the create client function in the vpn controller. --- 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`,