]> PHS Git Server - phs-api.git/commitdiff
Adding some logging to revoke client function to fix it.
authorcharleswrayjr <charleswrayjr@gmail.com>
Mon, 8 Sep 2025 23:20:46 +0000 (18:20 -0500)
committercharleswrayjr <charleswrayjr@gmail.com>
Mon, 8 Sep 2025 23:20:46 +0000 (18:20 -0500)
src/controllers/vpn.controller.js

index 0d5bd9d9a78a0c084c4f830ea71e06003dd0ae79..a2d464396d7e64c2570dc581c0c1b4bfe05aad4d 100644 (file)
@@ -96,11 +96,11 @@ module.exports = {
 
     const conn = new Client();
     conn.on( 'ready', () => {
-      logger.debug('ready')
+      logger.warn('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( ' && ' ) );
+      logger.warn( commands );
+      logger.warn( [...commands].join( ' && ' ) );
 
       conn.exec( commands.join( ' && ' ), ( err, stream ) => {
         if (err) {