You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
917 B
28 lines
917 B
#!/bin/bash |
|
# |
|
# modules_update_cron.sh |
|
# |
|
# Wrapper-Skript für den Cronjob. |
|
# Wird typischerweise aus /etc/crontab oder via "crontab -e" aufgerufen. |
|
# |
|
# Beispiel (werktags 18:00 Uhr): |
|
# 0 18 * * 1-5 /var/lib/tomcat10/webapps/superx/WEB-INF/bin/BI-Maintenance/update/hisinone_bi_qisserver/modules_update_cron.sh |
|
|
|
set -e |
|
|
|
ENV_FILE="/var/lib/tomcat10/webapps/superx/WEB-INF/bin/BI-Maintenance/env/BI_ENV" |
|
MAIN_SCRIPT="/var/lib/tomcat10/webapps/superx/WEB-INF/bin/BI-Maintenance/update/hisinone_bi_qisserver/modules_update.sh" |
|
CRONLOG="/var/lib/tomcat10/webapps/superx/WEB-INF/bin/BI-Maintenance/update/hisinone_bi_qisserver/modules_update.log" |
|
|
|
# Prüfen, ob ENV vorhanden ist |
|
if [ ! -f "$ENV_FILE" ]; then |
|
echo "FEHLER: ENV-Datei nicht gefunden: $ENV_FILE" >&2 |
|
exit 1 |
|
fi |
|
|
|
# Umgebung laden |
|
# shellcheck source=/dev/null |
|
. "$ENV_FILE" |
|
|
|
# Hauptskript ausführen, Ausgabe ins Cron-Log |
|
"$MAIN_SCRIPT" >>"$CRONLOG" 2>&1
|
|
|