Browse Source

Fix port logging in v-add-firewall-rule (#5176)

* Fix port logging in v-add-firewall-rule

More info: https://forum.hestiacp.com/t/bug-logging-added-firewall/20701
sahsanu 3 months ago
parent
commit
3260dc4074
1 changed files with 3 additions and 3 deletions
  1. 3 3
      bin/v-add-firewall-rule

+ 3 - 3
bin/v-add-firewall-rule

@@ -98,12 +98,12 @@ $BIN/v-update-firewall
 #----------------------------------------------------------#
 
 # Fix missing port value in log if zero
-if [ -z "$port" ]; then
-	port="0"
+if [ -z "$port_ext" ]; then
+	port_ext="0"
 fi
 
 # Logging
-$BIN/v-log-action "system" "Info" "Firewall" "Added firewall rule (Action: $action, Port: $port, Protocol: $protocol)."
+$BIN/v-log-action "system" "Info" "Firewall" "Added firewall rule (Action: $action, Port: $port_ext, Protocol: $protocol)."
 log_event "$OK" "$ARGUMENTS"
 
 exit