mirror of
https://github.com/femtofox/femtofox.git
synced 2026-10-26 19:02:00 -04:00
Update femto-runonce.sh
This commit is contained in:
parent
bde2c9b59a
commit
b308e4d603
1 changed files with 0 additions and 13 deletions
|
|
@ -3,11 +3,7 @@ log_message() {
|
|||
echo -e "\e[32mFirst boot\e[0m: $1" # Echo to the screen
|
||||
logger "First boot: $1" # Log to the system log
|
||||
}
|
||||
set -x
|
||||
if ! grep -qE '^first_boot=true' /etc/femto.conf; then # if not the first boot
|
||||
echo "*****************************************"
|
||||
echo "boot flag is false"
|
||||
echo "*****************************************"
|
||||
|
||||
who | grep -q . || exit 0 # if not logged in, exit script. May not deal well with future web UI
|
||||
|
||||
|
|
@ -26,9 +22,6 @@ Proceed?" 14 60
|
|||
exit 0
|
||||
fi
|
||||
else
|
||||
echo "*****************************************"
|
||||
echo "boot flag is true?"
|
||||
echo "*****************************************"
|
||||
fi
|
||||
|
||||
echo -e "\e[32m******* First boot *******\e[0m"
|
||||
|
|
@ -103,13 +96,7 @@ fi
|
|||
#systemctl restart meshtasticd
|
||||
|
||||
# remove first boot flag
|
||||
echo "*****************************************"
|
||||
cat /etc/femto.conf
|
||||
echo "*****************************************"
|
||||
sed -i -E 's/^first_boot=.*/first_boot=false/' /etc/femto.conf
|
||||
echo "*****************************************"
|
||||
cat /etc/femto.conf
|
||||
echo "*****************************************"
|
||||
log_message "Removing first boot flag and rebooting in 5 seconds..."
|
||||
sleep 5
|
||||
reboot
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue