]> PHS Git Server - phs-api.git/commitdiff
Removing debug logging from getStatus method on vpn.controller.js.
authorcharleswrayjr <charleswrayjr@gmail.com>
Tue, 9 Sep 2025 19:53:05 +0000 (14:53 -0500)
committercharleswrayjr <charleswrayjr@gmail.com>
Tue, 9 Sep 2025 19:53:05 +0000 (14:53 -0500)
src/controllers/vpn.controller.js

index 8b6b0d387dd6ebe1cd3cc78299fa1c84de98bc1e..87771c1cd2cbd343482ceb94ead71ce772ca31ba 100644 (file)
@@ -317,27 +317,20 @@ module.exports = {
     }
   },
   getStatus: async ( req, res, next ) => {
-    logger.warn( 'Getting VPN status');
     try {
       const conn = new Client();
       conn.on( 'ready', () => {
-        logger.warn('Connected to OpenVPN server');
         const command = `systemctl is-active openvpn@server`;
-        logger.warn(command);
         conn.exec( command, ( err, stream ) => {
           if (err) {
             conn.end();
             return next( new createError( 500, `SSH command failed: ${ err.message }` ) );
           }
-          logger.warn(stream);
           let output = '';
           stream.on( 'data', ( data ) => (output += data) );
           stream.stderr.on( 'data', ( data ) => (output += data) );
           stream.on( 'close', ( code ) => {
             conn.end();
-            logger.warn(code);
-            logger.warn( output );
-            logger.warn( output.trim() === 'active' );
             if (code === 0) {
               res.json( { active:output.trim() === 'active' } );
             } else {