Sammlung von Shellscripten und Werkzeugen zur SuperX/BI Webanwendung
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
804 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 /home/superx/git/BI_Maintenance/update/hisinone_bi_qisserver/modules_update_cron.sh
set -e
ENV_FILE="/home/superx/git/BI_Maintenance/env/BI_ENV"
MAIN_SCRIPT="/home/superx/git/BI_Maintenance/update/hisinone_bi_qisserver/modules_update.sh"
CRONLOG="/home/superx/git/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