From e0628ab962acd936bfe2d08431d50c54c39640375e6ca236b3370119ee9d2fb1 Mon Sep 17 00:00:00 2001 From: ADAM David Alan Martin Date: Thu, 3 Sep 2026 14:22:22 -0400 Subject: [PATCH] Only install allow_hosts file if it exists. --- rc.d/allow_hosts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rc.d/allow_hosts b/rc.d/allow_hosts index cf243cf..73ca382 100755 --- a/rc.d/allow_hosts +++ b/rc.d/allow_hosts @@ -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 '\' )" ] then pfctl -a allow-hosts -f ${allow_hosts_rules}