]> PHS Git Server - phs-api.git/commitdiff
Testing vpn paths.
authorcharleswrayjr <charleswrayjr@gmail.com>
Mon, 8 Sep 2025 04:12:46 +0000 (23:12 -0500)
committercharleswrayjr <charleswrayjr@gmail.com>
Mon, 8 Sep 2025 04:12:46 +0000 (23:12 -0500)
src/controllers/vpn.controller.js

index f1e9c9ed29d9457b9b62ef2c32d39b5bd8267f97..8d3cb0b48fb7034050ededfaa6f030d703f58e9a 100644 (file)
@@ -1,4 +1,5 @@
 const { Client } = require( 'ssh2' );
+const fs = require('fs').promises; // Use promises
 
 module.exports = {
   createClient:( req, res, next ) => {
@@ -73,7 +74,7 @@ module.exports = {
       res.status( 500 ).json( { error:`SSH connection failed: ${ err.message }` } );
     } ).connect( sshConfig );
   }, getClients:async ( req, res, next ) => {
-    const statusContent = await fs.readFile('/var/log/openvpn/status.log', 'utf8');
+    const statusContent = await fs.readFile('/var/log/openvpn/openvpn-status.log', 'utf8');
     const clients = [];
     let inClientList = false;