shell-host/firewall/firewall.inst

12 lines
469 B
Plaintext
Raw Normal View History

#!/bin/bash
if command -v firewall-cmd >/dev/null; then
if [[ $BASH_SHELL_HOSTNAME ]]; then
[[ ! -d $BASH_SHELL_HOSTNAME/load ]] && mkdir $BASH_SHELL_HOSTNAME/load
ln -s $BASH_SHELL_HOST/firewall/firewall $BASH_SHELL_HOSTNAME/load/firewall
cat $BASH_SHELL_HOSTNAME/load/firewall
else
hostn=$(basename $BASH_SHELL_BASE)/$(hostnamectl hostname)
[[ -d $hostn ]] && echo $hostn exists || echo $hostn does not exist
fi
fi