]> PHS Git Server - phs-api.git/commitdiff
Cleaning out debugging logs.
authorcharleswrayjr <charleswrayjr@gmail.com>
Tue, 9 Sep 2025 15:42:26 +0000 (10:42 -0500)
committercharleswrayjr <charleswrayjr@gmail.com>
Tue, 9 Sep 2025 15:42:26 +0000 (10:42 -0500)
src/controllers/vpn.controller.js

index d672c9feb61d489acd4fae506323faff11751c8d..d4c5746e57e64e363ee8a6969c03f6a3a688642d 100644 (file)
@@ -119,8 +119,6 @@ module.exports = {
         `rm -f /etc/openvpn/ccd/${ clientName }`,
         `sudo systemctl restart openvpn@server`,];
 
-      logger.warn( [...commands].join( ' && ' ) );
-
       conn.exec( commands.join( ' && ' ), ( err, stream ) => {
         if (err) {
           conn.end();
@@ -187,7 +185,8 @@ module.exports = {
                 hasOvpn:hasOvpn
               } );
             } catch (error) {
-              logger.warn( `Failed to read ${ ccdFile }: ${ error.message }` );
+              const err = new createError( 500, `Failed to read ${ ccdFile }: ${ error.message }` );
+              return next( err );
             }
           }// Add clients with certificates but no .ccd
           for (const crtFile of crtFiles) {