]> PHS Git Server - phs-api.git/commitdiff
finishing create vpn client, and console logs.
authorcharleswrayjr <charleswrayjr@gmail.com>
Tue, 9 Sep 2025 04:39:06 +0000 (23:39 -0500)
committercharleswrayjr <charleswrayjr@gmail.com>
Tue, 9 Sep 2025 04:39:06 +0000 (23:39 -0500)
src/controllers/vpn.controller.js

index 0ed06d5f14e577c4c290295ed6cc02389da9786e..95c507397f5b9cb407f63a714ba9448a5024b779 100644 (file)
@@ -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 }` );