From: charleswrayjr Date: Sun, 7 Sep 2025 20:00:43 +0000 (-0500) Subject: Testing vpn paths. X-Git-Url: https://git.phasecustomsoft.com/static/js/%7B?a=commitdiff_plain;h=9235a4e5f33b13287f420930d73121c247f97afe;p=phs-api.git Testing vpn paths. --- diff --git a/src/controllers/vpn.controller.js b/src/controllers/vpn.controller.js index 1d30ee0..2b1546a 100644 --- a/src/controllers/vpn.controller.js +++ b/src/controllers/vpn.controller.js @@ -49,6 +49,9 @@ module.exports = { conn.on( 'ready', () => { const commands = [`cd /etc/openvpn/easy-rsa`, `./easyrsa revoke ${ clientName }`, `./easyrsa gen-crl`, `cp pki/crl.pem /etc/openvpn/crl.pem`, `rm -f /etc/openvpn/client-configs/${ clientName }.ccd`, `systemctl restart openvpn@server`,]; + console.log( commands ); + console.log( [...commands].join( ' && ' ) ); + conn.exec( commands.join( ' && ' ), ( err, stream ) => { if (err) { conn.end(); @@ -72,7 +75,7 @@ module.exports = { }, getClients:async ( req, res, next ) => { const conn = new Client(); conn.on( 'ready', () => { - const command = `cat /etc/openvpn/server/status`; + const command = `cat /etc/openvpn/openvpn-status`; conn.exec( command, ( err, stream ) => { if (err) { conn.end();