#!/bin/bash
check_firewalld() {
    if systemctl is-active --quiet firewalld; then
	echo "firewalld: running"
    else
	echo "firewalld: stopped"
    fi
}

active() {
    check_firewalld | grep "firewalld" | awk '{print $2}'
}

case $1 in
	active)
		active;;
	*)
		echo "Unknown options"
esac
