update info layout

This commit is contained in:
rootzoll 2019-12-11 14:10:34 +01:00
parent 2e7745cee9
commit 751732c89f
2 changed files with 8 additions and 5 deletions

View File

@ -85,7 +85,7 @@ while :
# get the local network IP to be displayed on the lCD
localip=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
# get config info if already available
# get config info if already available (with state value)
source ${infoFile}
configExists=$(ls ${configFile} 2>/dev/null | grep -c '.conf')
if [ ${configExists} -eq 1 ]; then
@ -94,16 +94,14 @@ while :
# reboot info
if [ "${state}" = "reboot" ]; then
l1="Waiting for Reboot ...\n"
dialog --backtitle "RaspiBlitz ${codeVersion}" --infobox "$l1" 3 40
dialog --backtitle "RaspiBlitz ${codeVersion}" --infobox "Waiting for Reboot ..." 3 30
sleep 20
continue
fi
# shutdown info
if [ "${state}" = "shutdown" ]; then
l1="Waiting for Shutdown ...\n"
dialog --backtitle "RaspiBlitz ${codeVersion}" --infobox "$l1" 3 40
dialog --backtitle "RaspiBlitz ${codeVersion}" --infobox "Waiting for Shutdown ..." 3 30
sleep 20
continue
fi

View File

@ -1,4 +1,9 @@
#!/bin/bash
# for reboot call: sudo /home/admin/XXshutdown.sh reboot
# use this script instead of dirct shutdown command to:
# 1) give UI the info that a reboot/shutdown is now happening
# 2) shutdown/reboot in a safe way to prevent data corruption
# INFOFILE - state data from bootstrap
infoFile="/home/admin/raspiblitz.info"