Add exit at network check, config.conf > config.conf.sample

This commit is contained in:
no
2024-11-28 14:21:56 +01:00
parent c06012685f
commit 362a5071ca
3 changed files with 3 additions and 1 deletions
+2
View File
@@ -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
}