diff --git a/Utility/Log.sh b/Utility/Log.sh index 11a8f6d..ef2e989 100755 --- a/Utility/Log.sh +++ b/Utility/Log.sh @@ -17,6 +17,11 @@ log() { touch "$LOGFILE" 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 # Interaktive Shell echo "$(date +'%Y-%m-%d %H:%M:%S') - $1" | tee -a "$LOGFILE" >/dev/tty