#!/bin/sh

# Add PPP hooks
#--------------

CHECK=`grep '/usr/clearos/apps/firewall/deploy/firewall-ppp-check' /etc/ppp/ip-up.local 2>/dev/null`
if [ -z "$CHECK" ]; then
    logger -p local6.notice -t installer "app-firewall-core - adding PPTP and multiwan support for PPP up"
    echo "/usr/clearos/apps/firewall/deploy/firewall-ppp-check \$1" >> /etc/ppp/ip-up.local
    chmod 755 /etc/ppp/ip-up.local
fi

# Reload firewall service due to systemd migration
#-------------------------------------------------

systemctl daemon-reload >/dev/null 2>&1

# FIXME: quick fix - improve for 7.3
/sbin/chkconfig --add firewall >/dev/null 2>&1
/sbin/chkconfig firewall on >/dev/null 2>&1
/sbin/chkconfig --add firewall6 >/dev/null 2>&1
/sbin/chkconfig firewall6 on >/dev/null 2>&1
