improved exit

This commit is contained in:
no
2024-11-28 14:25:59 +01:00
parent 362a5071ca
commit 442b2ff660
3 changed files with 9 additions and 4 deletions
+2 -1
View File
@@ -21,4 +21,5 @@ function restart_service() {
fi
log_info "Service $SERVICE_NAME successfully restarted and verified."
}
return 0 # Erfolg
}
+3 -1
View File
@@ -19,7 +19,9 @@ function check_sql_activity() {
if (( (now - last_order_epoch) > 3600 && (now - last_bsi_epoch) > 7200 )); then
log_critical "SQL activity check failed. No activity in expected timeframes."
restart_service
exit 2 # Fehler, Dienst wurde neu gestartet
else
log_info "SQL activity is within acceptable limits."
exit 0 # Erfolg
fi
}
}