From 9ffd5b5a64f2f51b6a4e3a9d03de4d873b11953b Mon Sep 17 00:00:00 2001 From: ray-1337 <33544674+ray-1337@users.noreply.github.com> Date: Mon, 11 Apr 2022 23:33:38 +0200 Subject: [PATCH] return boolean normally instead --- src/methods/disable.js | 7 +------ src/methods/enable.js | 7 +------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/methods/disable.js b/src/methods/disable.js index 024c98e..9e8a454 100644 --- a/src/methods/disable.js +++ b/src/methods/disable.js @@ -13,12 +13,7 @@ module.exports = async function() { if (res.stderr) throw new Error(res.stderr); if (res.stdout) { - if (res.stdout == "Firewall stopped and disabled on system startup") { - return true; - } else { - console.log(res.stdout); - return false; - }; + return true; } else { return false; }; diff --git a/src/methods/enable.js b/src/methods/enable.js index 74c4011..75bc884 100644 --- a/src/methods/enable.js +++ b/src/methods/enable.js @@ -14,12 +14,7 @@ module.exports = async function() { if (res.stderr) throw new Error(res.stderr); if (res.stdout) { - if (res.stdout == "Firewall is active and enabled on system startup") { - return true; - } else { - console.log(res.stdout); - return false; - }; + return true; } else { return false; };