Feat: Erstellt die Logdatei, wenn sie nicht vorhanden ist.
This commit is contained in:
parent
50fccc03ab
commit
12e6cc7e32
@ -9,6 +9,9 @@ log() {
|
||||
if [ ! -d "$LOGDIR" ]; then
|
||||
mkdir -p "$LOGDIR"
|
||||
fi
|
||||
if [ ! -f "$LOGFILE" ]; then
|
||||
touch "$LOGFILE"
|
||||
fi
|
||||
|
||||
echo "$(date +'%Y-%m-%d %H:%M:%S') - $1" | tee -a "$LOGFILE"
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user