mirror of
https://github.com/hackacad/bastille.git
synced 2025-12-25 06:55:46 +01:00
Merge pull request #740 from BastilleBSD/setup-zfs-issue
setup: shellchek
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
|
||||
bastille_config="/usr/local/etc/bastille/bastille.conf"
|
||||
. /usr/local/share/bastille/common.sh
|
||||
# shellcheck source=/usr/local/etc/bastille/bastille.conf
|
||||
. ${bastille_config}
|
||||
|
||||
usage() {
|
||||
@@ -75,14 +76,16 @@ EOF
|
||||
|
||||
# Configure pf firewall
|
||||
configure_pf() {
|
||||
# shellcheck disable=SC2154
|
||||
if [ ! -f "${bastille_pf_conf}" ]; then
|
||||
# shellcheck disable=SC3043
|
||||
local ext_if
|
||||
ext_if=$(netstat -rn | awk '/default/ {print $4}' | head -n1)
|
||||
info "Determined default network interface: ($ext_if)"
|
||||
info "${bastille_pf_conf} does not exist: creating..."
|
||||
|
||||
## creating pf.conf
|
||||
cat << EOF > ${bastille_pf_conf}
|
||||
cat << EOF > "${bastille_pf_conf}"
|
||||
## generated by bastille setup
|
||||
ext_if="$ext_if"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user