#
# thomas@linuxmuster.net
# 20160711
# GPL v3
#

echo "### 04_firewall postpatch"

# initial firewall configuration on firewall changes
[ -n "$ipcoppw" ] && /usr/sbin/linuxmuster-ipfire --setup --first --password="$ipcoppw"

# remove firewall from known_hosts if it is there, on first install or certificates need to be renewed
if [ -e /root/.ssh/known_hosts -a -n "$ipcoppw" ]; then
 for f in $ipcopip $ipcopip_old ipcop ipfire; do
  ssh-keygen -f /root/.ssh/known_hosts -R ["$f"]:222
 done
fi
