From: charleswrayjr Date: Mon, 8 Sep 2025 04:12:46 +0000 (-0500) Subject: Testing vpn paths. X-Git-Url: https://git.phasecustomsoft.com/?a=commitdiff_plain;h=e08b0e0583f97b9386dc025d226983cc87be1fed;p=phs-api.git Testing vpn paths. --- diff --git a/src/controllers/vpn.controller.js b/src/controllers/vpn.controller.js index f1e9c9e..8d3cb0b 100644 --- a/src/controllers/vpn.controller.js +++ b/src/controllers/vpn.controller.js @@ -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;