feat: Add system uptime text to infoBlitz script #4108 (#4600)

This commit is contained in:
/rootzoll 2024-05-29 23:44:05 +02:00 committed by GitHub
parent af85242be5
commit 1cdfc3e6f6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View file

@ -19,6 +19,7 @@ source <(/home/admin/_cache.sh get \
system_ups_status \
system_ups_battery \
system_cpu_load \
system_up_text \
system_temp_celsius \
system_temp_fahrenheit \
runBehindTor \
@ -311,7 +312,8 @@ if [ "${blitzapi}" == "on" ]; then
webuiinfo="Web Admin --> http://${internet_localip}"
fi
datetime=$(date -R)
datetime=$(date +"%d %b %T %z")
datetime="${datetime} up ${system_up_text}"
stty sane
sleep 1

View file

@ -141,7 +141,9 @@ do
# uptime just do on every run
system_up=$(cat /proc/uptime | grep -o '^[0-9]\+')
system_up_text=$(uptime -p | cut -d ' ' -f 2- | cut -d ',' -f 1 | awk '{print $1 substr($2, 1, 1)}')
/home/admin/_cache.sh set system_up "${system_up}"
/home/admin/_cache.sh set system_up_text "${system_up_text}"
# cpu load
cpu_load=$(w | head -n 1 | cut -d 'v' -f2 | cut -d ':' -f2)