Skip to content

[Feature Request]: check/ck_firewalld: check if current firewalld status is given value  #83

@aronchanisme

Description

@aronchanisme

Is there an existing issue for the feature request?

  • I have checked the existing issues.

Feature Description

check if current firewalld status is given value

usage:
check/ck_firewall.sh , where,
status: on|off , e.g. off(default)

example:
check/ck_firewall.sh
check/ck_firewall.sh off
check/ck_firewall.sh on

output:
return 0: if matches given status
return 1: otherwise

Feature Implementation

systemctl status firewalld # Active: inactive (dead) | Active: running
echo $? # non-zero means not running, otherwise means running

Additional information

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions