mirror of
https://github.com/azlux/log2ram.git
synced 2023-10-10 13:37:24 +02:00
Update log2ram
Use date as fallback if printf -v fails. reason is, that printf -v is not defined in POSIX
This commit is contained in:
parent
e993fa880e
commit
6294b73126
2
log2ram
2
log2ram
@ -8,7 +8,7 @@ RAM_LOG=/var/log
|
||||
LOG_NAME="log2ram.log"
|
||||
LOG2RAM_LOG="${RAM_LOG}/${LOG_NAME}"
|
||||
LOG_OUTPUT="tee -a $LOG2RAM_LOG"
|
||||
printf -v NOW '%(%F %H:%M:%S)T' -1 # Actual date and time
|
||||
printf -v NOW '%(%F %H:%M:%S)T' -1 || NOW=$(date '+%F %H:%M:%S') # Actual date and time (date as fallback)
|
||||
|
||||
isSafe () {
|
||||
[ -d $HDD_LOG/ ] || echo "ERROR: $HDD_LOG/ doesn't exist! Can't sync."
|
||||
|
Loading…
x
Reference in New Issue
Block a user