Fix: Pass die Log-FUnktion an, indem Berechtigugnen gesetzt werden.

This commit is contained in:
DragonSlayer_14 2025-03-08 14:19:25 +01:00
parent a655a7db4c
commit 338bec55e9

View File

@ -17,6 +17,11 @@ log() {
touch "$LOGFILE" touch "$LOGFILE"
fi fi
# Prüfen, ob der Benutzer der Besitzer des Verzeichnisses ist
if [ -d "$LOGDIR" ] && [ -O "$LOGDIR" ]; then
chmod -R 777 "$LOGDIR"
fi
if is_interactive; then if is_interactive; then
# Interaktive Shell # Interaktive Shell
echo "$(date +'%Y-%m-%d %H:%M:%S') - $1" | tee -a "$LOGFILE" >/dev/tty echo "$(date +'%Y-%m-%d %H:%M:%S') - $1" | tee -a "$LOGFILE" >/dev/tty