From: charleswrayjr Date: Tue, 9 Sep 2025 04:39:06 +0000 (-0500) Subject: finishing create vpn client, and console logs. X-Git-Url: https://git.phasecustomsoft.com/logo192.png?a=commitdiff_plain;h=ab7becbc0ec6a27c73a89907e713ecb00edaa76c;p=phs-api.git finishing create vpn client, and console logs. --- diff --git a/src/controllers/vpn.controller.js b/src/controllers/vpn.controller.js index 0ed06d5..95c5073 100644 --- a/src/controllers/vpn.controller.js +++ b/src/controllers/vpn.controller.js @@ -73,8 +73,6 @@ module.exports = { `cat /etc/openvpn/clients/${clientName}.ovpn`, ]; - console.log( commands ); - console.log( [...commands].join( ' && ' ) ); conn.exec( commands.join( ' && ' ), ( err, stream ) => { if (err) { conn.end(); @@ -112,7 +110,6 @@ module.exports = { const conn = new Client(); conn.on( 'ready', () => { - logger.warn('ready') const commands = [ `cd /etc/openvpn/easy-rsa`, `./easyrsa --batch revoke ${ clientName }`, @@ -122,9 +119,6 @@ module.exports = { `rm -f /etc/openvpn/ccd/${ clientName }`, `sudo systemctl restart openvpn@server`,]; - logger.warn( commands ); - logger.warn( [...commands].join( ' && ' ) ); - conn.exec( commands.join( ' && ' ), ( err, stream ) => { if (err) { conn.end(); @@ -166,7 +160,6 @@ module.exports = { conn.end(); if (code === 0) { const clients = parseVpnStatus( output ); - console.log( clients ); res.json( { clients } ); } else { const error = new createError( 500, `Command failed: ${ output }` );