mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-29 13:02:35 +02:00
fix basic setup choices
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
# these are the same set of infos the WebGUI dialog/controler has
|
# these are the same set of infos the WebGUI dialog/controler has
|
||||||
source /home/admin/_version.info
|
source /home/admin/_version.info
|
||||||
|
|
||||||
specialOption=$2 # (optional - can be 'update', 'recovery' or 'migration' )
|
specialOption=$1 # (optional - can be 'update', 'recovery' or 'migration' )
|
||||||
|
|
||||||
# chose how to setup node (fresh or from a upload backup)
|
# chose how to setup node (fresh or from a upload backup)
|
||||||
OPTIONS=()
|
OPTIONS=()
|
||||||
@@ -17,11 +17,14 @@ if [ "${specialOption}" == "migration" ]; then
|
|||||||
fi
|
fi
|
||||||
OPTIONS+=(FROMBACKUP "Upload Migration Backup")
|
OPTIONS+=(FROMBACKUP "Upload Migration Backup")
|
||||||
OPTIONS+=(SHUTDOWN "Shutdown without Changes")
|
OPTIONS+=(SHUTDOWN "Shutdown without Changes")
|
||||||
|
|
||||||
|
CHOICE_HEIGHT=$(("${#OPTIONS[@]}/2+1"))
|
||||||
|
HEIGHT=$((CHOICE_HEIGHT+6))
|
||||||
CHOICE=$(dialog --clear \
|
CHOICE=$(dialog --clear \
|
||||||
--backtitle "RaspiBlitz ${codeVersion} - Setup" \
|
--backtitle "RaspiBlitz ${codeVersion} - Setup" \
|
||||||
--title "⚡ Welcome to your RaspiBlitz ⚡" \
|
--title "⚡ Welcome to your RaspiBlitz ⚡" \
|
||||||
--menu "\nChoose how you want to setup your RaspiBlitz: \n " \
|
--menu "\nChoose how you want to setup your RaspiBlitz: \n " \
|
||||||
12 64 6 \
|
$CHOICE_HEIGHT 64 $HEIGHT \
|
||||||
"${OPTIONS[@]}" \
|
"${OPTIONS[@]}" \
|
||||||
2>&1 >/dev/tty)
|
2>&1 >/dev/tty)
|
||||||
clear
|
clear
|
||||||
|
Reference in New Issue
Block a user