Update taillog.sh
change logging method makes it green!
This commit is contained in:
parent
883f6e3ba6
commit
fadda28c92
1 changed files with 11 additions and 5 deletions
|
@ -2,17 +2,23 @@
|
||||||
|
|
||||||
cd /
|
cd /
|
||||||
|
|
||||||
#create lognow variable
|
#---- Create lognow variable
|
||||||
lognow=$(date +%Y%m%d)
|
lognow=$(date +%Y%m%d)
|
||||||
|
|
||||||
# Sleep until log updated from last SBFspot run
|
# Sleep until log updated from last SBFspot run
|
||||||
sleep 45
|
sleep 45
|
||||||
|
|
||||||
# set tail to log out to HA log
|
#---- set tail to log out to HA log
|
||||||
# Use lognow variable to select latest file
|
#---- Use lognow variable to select latest file
|
||||||
echo '[SBFspot Upload Log Latest]'
|
#---- Print tail of latest log
|
||||||
tail -n1 /data/sbfspot/log/SBFspotUpload$lognow.log >> /proc/1/fd/1
|
|
||||||
|
|
||||||
|
message=$(echo "[SBFspot Upload Log Latest] $(tail -n1 /data/sbfspot/log/SBFspotUpload$lognow.log)")
|
||||||
|
|
||||||
|
## Print the message the user supplied, defaults to "Hello World..."
|
||||||
|
bashio::log.info "${message:="Hello World..."}"
|
||||||
|
|
||||||
|
|
||||||
|
#---- Delete old log files
|
||||||
#busybox command for minus 1 day
|
#busybox command for minus 1 day
|
||||||
#date +%Y%m%d -d @$(($(date +%s)-86400))
|
#date +%Y%m%d -d @$(($(date +%s)-86400))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue