Browse Source

remove unneeded property

develop
ray-1337 3 years ago
parent
commit
84ac77f499
  1. 2
      src/methods/disable.js
  2. 2
      src/methods/enable.js

2
src/methods/disable.js

@ -6,7 +6,7 @@ const promisifiedExec = promisify(exec);
* Disable ufw. (root/sudo access is mandatory)
* @returns {Promise<Boolean>} Returns a boolean.
*/
module.exports.disable = async function() {
module.exports = async function() {
try {
let res = await promisifiedExec(`echo "y" | sudo ufw disable`);

2
src/methods/enable.js

@ -6,7 +6,7 @@ const promisifiedExec = promisify(exec);
* Enable ufw. (root/sudo access is mandatory)
* @returns {Promise<Boolean>} Returns a boolean.
*/
module.exports.enable = async function() {
module.exports = async function() {
try {
// https://serverfault.com/a/790150
let res = await promisifiedExec(`echo "y" | sudo ufw enable`);

Loading…
Cancel
Save