Anchor for rules must exist before updating.
This commit is contained in:
+4
-1
@@ -29,7 +29,10 @@ allow_hosts_start()
|
|||||||
{
|
{
|
||||||
echo "Running allow hosts"
|
echo "Running allow hosts"
|
||||||
echo "include \"${allow_hosts_rules}\"" > ${rc_router_gen_dir}/pf.rules.conf
|
echo "include \"${allow_hosts_rules}\"" > ${rc_router_gen_dir}/pf.rules.conf
|
||||||
pfctl -a allow-hosts -f ${allow_hosts_rules}
|
if [ -n "$( pfctl -s Anchor | grep '\<allow-hosts\>' )" ]
|
||||||
|
then
|
||||||
|
pfctl -a allow-hosts -f ${allow_hosts_rules}
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
allow_hosts_stop()
|
allow_hosts_stop()
|
||||||
|
|||||||
Reference in New Issue
Block a user