diff --git a/usr/local/share/bastille/setup.sh b/usr/local/share/bastille/setup.sh index 1744ad9b..09c2018d 100644 --- a/usr/local/share/bastille/setup.sh +++ b/usr/local/share/bastille/setup.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2018-2022, Christer Edwards +# Copyright (c) 2018-2023, Christer Edwards # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -60,14 +60,14 @@ configure_vnet() { # Configure pf firewall configure_pf() { -if [ ! -f "/etc/pf.conf" ]; then +if [ ! -f "${bastille_pf_conf}" ]; then local ext_if ext_if=$(netstat -rn | awk '/default/ {print $4}' | head -n1) info "Determined default network interface: ($ext_if)" - info "/etc/pf.conf does not exist: creating..." + info "${bastille_pf_conf} does not exist: creating..." ## creating pf.conf - cat << EOF > /etc/pf.conf + cat << EOF > ${bastille_pf_conf} ## generated by bastille setup ext_if="$ext_if" @@ -86,7 +86,7 @@ pass in inet proto tcp from any to any port ssh flags S/SA keep state EOF sysrc pf_enable=YES else - error_exit "/etc/pf.conf already exists. Exiting." + error_exit "${bastille_pf_conf} already exists. Exiting." fi }