mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2025-02-25 15:10:38 +01:00
58 lines
No EOL
1.6 KiB
Bash
58 lines
No EOL
1.6 KiB
Bash
#!/bin/bash
|
|
|
|
# get basic system information
|
|
# these are the same set of infos the WebGUI dialog/controler has
|
|
source /home/admin/raspiblitz.info
|
|
|
|
# SETUPFILE
|
|
# this key/value file contains the state during the setup process
|
|
SETUPFILE="/var/cache/raspiblitz/raspiblitz.setup"
|
|
source <($SETUPFILE)
|
|
|
|
# choose blockchain or select migration
|
|
OPTIONS=()
|
|
OPTIONS+=(BITCOIN1 "Setup BITCOIN & Lightning Network Daemon (LND)")
|
|
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")
|
|
CHOICE=$(dialog --clear \
|
|
--backtitle "RaspiBlitz ${codeVersion} - Setup" \
|
|
--title "⚡ Welcome to your RaspiBlitz ⚡" \
|
|
--menu "\nChoose how you want to setup your RaspiBlitz: \n " \
|
|
13 64 7 \
|
|
"${OPTIONS[@]}" \
|
|
2>&1 >/dev/tty)
|
|
clear
|
|
network=""
|
|
lightning=""
|
|
migrationOS=""
|
|
case $CHOICE in
|
|
BITCOIN1)
|
|
network="bitcoin"
|
|
lightning="lnd"
|
|
;;
|
|
BITCOIN2)
|
|
network="bitcoin"
|
|
lightning="cln"
|
|
;;
|
|
LITECOIN)
|
|
network="litecoin"
|
|
lightning="lnd"
|
|
;;
|
|
MIGRATION)
|
|
migrationOS="raspiblitz"
|
|
;;
|
|
esac
|
|
|
|
# on cancel - exit with 1
|
|
if [ "${network}" == "" ] && [ "${migrationOS}" == "" ]; then
|
|
exit 1
|
|
fi
|
|
|
|
# write results to setup sate
|
|
echo "migrationOS='${migrationOS}'" >> $SETUPFILE
|
|
echo "migrationVersion=''" >> $SETUPFILE
|
|
echo "lightning=${lightning}" >> $SETUPFILE
|
|
echo "network=${network}" >> $SETUPFILE
|
|
|
|
exit 0 |