#!/bin/bash

if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
    set -x
fi
set -eu
set -o pipefail

case "${DISTRO_NAME}" in
    fedora | centos7 | rhel7 )
        if type -p systemctl && [[ $(systemctl --no-pager list-unit-files firewalld) =~ 'enabled' ]]; then
            systemctl disable firewalld
        fi
    ;;
    * )
        echo "Unknown distro: $DISTRO_NAME. Skipping."
    ;;
esac
