Only install allow_hosts file if it exists.
This commit is contained in:
+4
-1
@@ -28,7 +28,10 @@ fi
|
||||
allow_hosts_start()
|
||||
{
|
||||
echo "Running allow hosts"
|
||||
echo "include \"${allow_hosts_rules}\"" > ${rc_router_gen_dir}/pf.rules.conf
|
||||
if [ -e "${allow_hosts_rules}" ]
|
||||
then
|
||||
echo "include \"${allow_hosts_rules}\"" > ${rc_router_gen_dir}/pf.rules.conf
|
||||
fi
|
||||
if [ -n "$( pfctl -s Anchor | grep '\<allow-hosts\>' )" ]
|
||||
then
|
||||
pfctl -a allow-hosts -f ${allow_hosts_rules}
|
||||
|
||||
Reference in New Issue
Block a user