add stop file for laptop

This commit is contained in:
rootzoll 2025-02-06 00:27:20 +01:00
parent 3330a895ef
commit 9f4fdee7b1
2 changed files with 6 additions and 1 deletions

View File

@ -123,8 +123,12 @@ raspi_bootdir="/boot/firmware"
######################################
# STOP flags - for manual provision
# when a file 'stop' is on the sd card bootfs partition root - stop for manual provision
# when a file 'stop' is on the sd card bootfs partition root - stop for manual provision (raspberrypi)
flagExists=$(ls ${raspi_bootdir}/stop 2>/dev/null | grep -c 'stop')
# when a file 'stop' is in the /home/admin directory - stop for manual provision (laptop)
if [ "${flagExists}" = "0" ]; then
flagExists=$(ls /home/admin/stop 2>/dev/null | grep -c 'stop')
fi
if [ "${flagExists}" = "1" ]; then
localip=$(hostname -I | awk '{print $1}')
/home/admin/_cache.sh set state "stop"

View File

@ -27,6 +27,7 @@ sudo systemctl stop background.scan.service
# remove stop flag (if exists)
echo "deleting stop flag .."
sudo rm ${raspi_bootdir}/stop 2>/dev/null
sudo rm /home/admin/stop 2>/dev/null
# cleaning logs
echo "deleting raspiblitz & system logs .."