diff --git a/README.md b/README.md index fe0fa01..1a58fc5 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ Dieses Projekt implementiert ein flexibles und robustes VPN-Überwachungsskript, chmod +x functions/*.sh ``` -4. Passe die `config.conf` Datei an: +4. Kopiere `config.conf.sample` zu `config.conf` und passe die Datei an: - Definiere Netzwerkinterface, Schwellenwerte, Datenbankeinstellungen, SSH-Details und Logdateipfad. 5. (Optional) Füge die Logrotation hinzu: diff --git a/config.conf b/config.conf.sample similarity index 100% rename from config.conf rename to config.conf.sample diff --git a/functions/network_check.sh b/functions/network_check.sh index c6a720f..dad9230 100644 --- a/functions/network_check.sh +++ b/functions/network_check.sh @@ -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 }