Verschiebe in Root

This commit is contained in:
no
2024-11-28 13:36:01 +01:00
parent a99479e4c6
commit fca6e5ba93
8 changed files with 0 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
#!/bin/bash
# Source Konfigurations- und Modul-Dateien
source config.conf
source functions/logging.sh
source functions/network_check.sh
source functions/sql_check.sh
source functions/restart_service.sh
# Funktion zur Prüfung der Arbeitszeit
function is_within_business_hours() {
current_hour=$(date +%H)
if (( current_hour >= 7 && current_hour < 18 )); then
return 0 # True
else
return 1 # False
fi
}
# Hauptlogik
function main() {
log_info "Starting VPN monitoring script."
if is_within_business_hours; then
log_info "Within business hours. Running network check."
check_network_traffic
else
log_info "Outside business hours. Running SQL activity check."
check_sql_activity
fi
}
main