mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-27 12:06:36 +02:00
extend initial choice
This commit is contained in:
@@ -1,34 +1,39 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
_temp=$(mktemp -p /dev/shm/)
|
|
||||||
|
|
||||||
## get basic info
|
# get basic info
|
||||||
source /home/admin/raspiblitz.info
|
source /home/admin/raspiblitz.info
|
||||||
|
|
||||||
|
# temp file for dialog results
|
||||||
|
_temp=$(mktemp -p /dev/shm/)
|
||||||
|
|
||||||
# choose blockchain or select migration
|
# choose blockchain or select migration
|
||||||
OPTIONS=()
|
OPTIONS=()
|
||||||
OPTIONS+=(BITCOIN "Setup BITCOIN and Lightning (DEFAULT)")
|
OPTIONS+=(BITCOIN1 "Setup BITCOIN & Lightning Network Daemon (LND)")
|
||||||
OPTIONS+=(LITECOIN "Setup LITECOIN and Lightning (EXPERIMENTAL)")
|
OPTIONS+=(BITCOIN2 "Setup BITCOIN & c-lightning by blockstream")
|
||||||
|
OPTIONS+=(LITECOIN "Setup LITECOIN & Lightning Network Daemon (LND)")
|
||||||
OPTIONS+=(MIGRATION "Upload a Migration File from old RaspiBlitz")
|
OPTIONS+=(MIGRATION "Upload a Migration File from old RaspiBlitz")
|
||||||
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 \
|
13 64 7 \
|
||||||
"${OPTIONS[@]}" \
|
"${OPTIONS[@]}" \
|
||||||
2>&1 >/dev/tty)
|
2>&1 >/dev/tty)
|
||||||
clear
|
clear
|
||||||
network=""
|
network=""
|
||||||
|
lightning=""
|
||||||
case $CHOICE in
|
case $CHOICE in
|
||||||
CLOSE)
|
BITCOIN1)
|
||||||
# TODO: check if case every comes up
|
|
||||||
echo "CLOSE"
|
|
||||||
exit 1;
|
|
||||||
;;
|
|
||||||
BITCOIN)
|
|
||||||
network="bitcoin"
|
network="bitcoin"
|
||||||
|
lightning="lnd"
|
||||||
|
;;
|
||||||
|
BITCOIN2)
|
||||||
|
network="bitcoin"
|
||||||
|
lightning="cln"
|
||||||
;;
|
;;
|
||||||
LITECOIN)
|
LITECOIN)
|
||||||
network="litecoin"
|
network="litecoin"
|
||||||
|
lightning="lnd"
|
||||||
;;
|
;;
|
||||||
MIGRATION)
|
MIGRATION)
|
||||||
# send over to the migration dialogs
|
# send over to the migration dialogs
|
||||||
@@ -39,7 +44,8 @@ esac
|
|||||||
|
|
||||||
# on cancel - exit to terminal
|
# on cancel - exit to terminal
|
||||||
if [ "${network}" == "" ]; then
|
if [ "${network}" == "" ]; then
|
||||||
echo "# exit to terminal"
|
echo "# you selected cancel - exited to terminal"
|
||||||
|
echo "# use command to reboot --> restart"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -50,6 +56,7 @@ rm $CONFIGFILE 2>/dev/null
|
|||||||
echo "# RASPIBLITZ CONFIG FILE" > $CONFIGFILE
|
echo "# RASPIBLITZ CONFIG FILE" > $CONFIGFILE
|
||||||
echo "raspiBlitzVersion='${codeVersion}'" >> $CONFIGFILE
|
echo "raspiBlitzVersion='${codeVersion}'" >> $CONFIGFILE
|
||||||
echo "lcdrotate=1" >> $CONFIGFILE
|
echo "lcdrotate=1" >> $CONFIGFILE
|
||||||
|
echo "lightning=${lightning}" >> $CONFIGFILE
|
||||||
echo "network=${network}" >> $CONFIGFILE
|
echo "network=${network}" >> $CONFIGFILE
|
||||||
echo "chain=main" >> $CONFIGFILE
|
echo "chain=main" >> $CONFIGFILE
|
||||||
|
|
||||||
@@ -58,6 +65,9 @@ SETUPFILE="/home/admin/raspiblitz.setup.tmp"
|
|||||||
rm $SETUPFILE 2>/dev/null
|
rm $SETUPFILE 2>/dev/null
|
||||||
echo "# RASPIBLITZ SETUP FILE" > $SETUPFILE
|
echo "# RASPIBLITZ SETUP FILE" > $SETUPFILE
|
||||||
|
|
||||||
|
echo "TODO: continue with further "
|
||||||
|
exit 1
|
||||||
|
|
||||||
###################
|
###################
|
||||||
# ENTER NAME
|
# ENTER NAME
|
||||||
###################
|
###################
|
||||||
|
Reference in New Issue
Block a user