]> PHS Git Server - phs-api.git/commitdiff
Testing vpn paths.
authorcharleswrayjr <charleswrayjr@gmail.com>
Sun, 7 Sep 2025 20:00:43 +0000 (15:00 -0500)
committercharleswrayjr <charleswrayjr@gmail.com>
Sun, 7 Sep 2025 20:00:43 +0000 (15:00 -0500)
src/controllers/vpn.controller.js

index 1d30ee0cbc11c1c51d093bffcbbefbfcbcf28477..2b1546a401501a28e187cef7a6d3245e395f772b 100644 (file)
@@ -49,6 +49,9 @@ module.exports = {
     conn.on( 'ready', () => {
       const commands = [`cd /etc/openvpn/easy-rsa`, `./easyrsa revoke ${ clientName }`, `./easyrsa gen-crl`, `cp pki/crl.pem /etc/openvpn/crl.pem`, `rm -f /etc/openvpn/client-configs/${ clientName }.ccd`, `systemctl restart openvpn@server`,];
 
+      console.log( commands );
+      console.log( [...commands].join( ' && ' ) );
+
       conn.exec( commands.join( ' && ' ), ( err, stream ) => {
         if (err) {
           conn.end();
@@ -72,7 +75,7 @@ module.exports = {
   }, getClients:async ( req, res, next ) => {
     const conn = new Client();
     conn.on( 'ready', () => {
-      const command = `cat /etc/openvpn/server/status`;
+      const command = `cat /etc/openvpn/openvpn-status`;
       conn.exec( command, ( err, stream ) => {
         if (err) {
           conn.end();