update_firewall-script_ipt-gateway.sh: Fix error restarting firewall.
This commit is contained in:
parent
33b4a60887
commit
29cc5150b7
@ -206,6 +206,7 @@ DEFAULT_FIREWALL_CONFIGURATION_FILES="
|
||||
logging_ipv4.conf
|
||||
logging_ipv6.conf
|
||||
post_decalrations.conf
|
||||
default_ports.conf
|
||||
"
|
||||
|
||||
if [[ -f "$conf_file" ]]; then
|
||||
@ -330,7 +331,7 @@ blank_line
|
||||
|
||||
echononl "Restart IPv4 Firewall.."
|
||||
if $restart_ipv4_firewall ; then
|
||||
/usr/local/sbin/$IPV6_FIREWALL_SCRIPT > /dev/null 2> "$log_file"
|
||||
/usr/local/sbin/$IPV4_FIREWALL_SCRIPT > /dev/null 2> "$log_file"
|
||||
if [[ $? -gt 0 ]]; then
|
||||
echo_failed
|
||||
error "$(cat "$log_file")"
|
||||
@ -342,7 +343,9 @@ else
|
||||
fi
|
||||
|
||||
echononl "Restart IPv6 Firewall.."
|
||||
if $restart_ipv6_firewall ; then
|
||||
if $restart_ipv6_firewall \
|
||||
&& [[ -f "/etc/ipt-firewall/main_ipv6.conf" ]] \
|
||||
&& [[ -f "/usr/local/sbin/$IPV6_FIREWALL_SCRIPT" ]]; then
|
||||
/usr/local/sbin/$IPV6_FIREWALL_SCRIPT > /dev/null 2> "$log_file"
|
||||
if [[ $? -gt 0 ]]; then
|
||||
echo_failed
|
||||
@ -354,7 +357,7 @@ else
|
||||
echo_skipped
|
||||
fi
|
||||
|
||||
info "Configuration files \033[1mmain_ipv[4|6].conf\033[m and \033[1mdefault_ports.conf\033[m are not considered."
|
||||
info "Configuration files \033[1mmain_ipv[4|6].conf\033[m are not considered."
|
||||
|
||||
|
||||
clean_up 0
|
||||
|
Loading…
Reference in New Issue
Block a user