]> PHS Git Server - phs-api.git/commitdiff
Cleaning up the revoke client function and starting on the create client function...
authorcharleswrayjr <charleswrayjr@gmail.com>
Tue, 9 Sep 2025 02:10:27 +0000 (21:10 -0500)
committercharleswrayjr <charleswrayjr@gmail.com>
Tue, 9 Sep 2025 02:10:27 +0000 (21:10 -0500)
src/controllers/vpn.controller.js

index a90b2fe679f0a095ae6c3efe3f77e791dd6c76ab..6b62f14b3860b2febcc406558993da838a226aa4 100644 (file)
@@ -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`,