Add exit at network check, config.conf > config.conf.sample
This commit is contained in:
@@ -25,7 +25,9 @@ function check_network_traffic() {
|
||||
if (( $(echo "$avg_inbound < $THRESHOLD_INBOUND" | bc -l) )) || (( $(echo "$avg_outbound < $THRESHOLD_OUTBOUND" | bc -l) )); then
|
||||
log_critical "Network traffic below thresholds. Avg In: $avg_inbound KB/s, Avg Out: $avg_outbound KB/s."
|
||||
restart_service
|
||||
exit 2 # Exit with error status if thresholds are not met
|
||||
else
|
||||
log_info "Network traffic is above thresholds. Avg In: $avg_inbound KB/s, Avg Out: $avg_outbound KB/s."
|
||||
exit 0 # Exit with success status
|
||||
fi
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user