From 4b4b48d49a1ddb5300f6a090a6cbc5dc20f8b197 Mon Sep 17 00:00:00 2001 From: charleswrayjr Date: Mon, 8 Sep 2025 23:19:39 -0500 Subject: [PATCH] Cleaning up the revoke client function and starting on the create client function in the vpn controller. --- src/controllers/vpn.controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/vpn.controller.js b/src/controllers/vpn.controller.js index 2b6b0f0..7fdcda9 100644 --- a/src/controllers/vpn.controller.js +++ b/src/controllers/vpn.controller.js @@ -86,7 +86,7 @@ module.exports = { stream.stderr.on( 'data', ( data ) => (output += data) ); stream.on( 'close', ( code ) => { conn.end(); - const final = fs.readFileSync( `/home/node/clients/${ clientName }.ovpn` ); + const final = fs.readFileSync( `/home/node/clients/${ clientName }.ovpn`, 'utf8' ); if (code === 0) { res.json( { message:`Client ${ clientName } created${ staticIp ? ` with IP ${ staticIp }` : '' }`, -- 2.43.0