2018-10-15 14:43:09 +02:00
#!/bin/bash
# get raspiblitz config
2019-01-18 23:38:36 +01:00
echo "get raspiblitz config"
2019-02-02 23:49:04 +01:00
source /home/admin/raspiblitz.info
2018-10-15 14:43:09 +02:00
source /mnt/hdd/raspiblitz.conf
2019-02-02 23:49:04 +01:00
2019-01-18 23:38:36 +01:00
echo "services default values"
2021-08-04 00:18:30 +02:00
if [ ${# runBehindTor } -eq 0 ] ; then runBehindTor = "off" ; fi
2018-12-02 23:08:20 +01:00
if [ ${# rtlWebinterface } -eq 0 ] ; then rtlWebinterface = "off" ; fi
2021-08-04 00:18:30 +02:00
if [ ${# crtlWebinterface } -eq 0 ] ; then crtlWebinterface = "off" ; fi
2019-11-24 14:12:55 +01:00
if [ ${# BTCRPCexplorer } -eq 0 ] ; then BTCRPCexplorer = "off" ; fi
2020-03-16 15:11:39 +01:00
if [ ${# specter } -eq 0 ] ; then specter = "off" ; fi
2019-12-04 09:13:21 +01:00
if [ ${# BTCPayServer } -eq 0 ] ; then BTCPayServer = "off" ; fi
2019-12-04 12:18:56 +01:00
if [ ${# ElectRS } -eq 0 ] ; then ElectRS = "off" ; fi
2019-12-17 19:33:18 +01:00
if [ ${# lndmanage } -eq 0 ] ; then lndmanage = "off" ; fi
2020-03-24 15:31:25 +01:00
if [ ${# joinmarket } -eq 0 ] ; then joinmarket = "off" ; fi
2020-04-23 23:13:09 +02:00
if [ ${# LNBits } -eq 0 ] ; then LNBits = "off" ; fi
2020-10-07 22:21:19 +02:00
if [ ${# mempoolExplorer } -eq 0 ] ; then mempoolExplorer = "off" ; fi
2020-05-18 16:25:39 +02:00
if [ ${# bos } -eq 0 ] ; then bos = "off" ; fi
2020-10-18 15:29:17 +02:00
if [ ${# pyblock } -eq 0 ] ; then pyblock = "off" ; fi
2020-06-01 12:52:40 +02:00
if [ ${# thunderhub } -eq 0 ] ; then thunderhub = "off" ; fi
2020-11-15 22:07:53 +01:00
if [ ${# sphinxrelay } -eq 0 ] ; then sphinxrelay = "off" ; fi
2021-03-18 22:46:58 +01:00
if [ ${# lit } -eq 0 ] ; then lit = "off" ; fi
2021-03-22 23:36:21 +01:00
if [ ${# whitepaper } -eq 0 ] ; then whitepaper = "off" ; fi
2021-03-23 20:15:39 +01:00
if [ ${# chantools } -eq 0 ] ; then chantools = "off" ; fi
2022-05-17 22:08:25 +02:00
if [ ${# homer } -eq 0 ] ; then homer = "off" ; fi
2021-08-04 00:18:30 +02:00
if [ ${# sparko } -eq 0 ] ; then sparko = "off" ; fi
2021-10-01 13:14:42 +02:00
if [ ${# spark } -eq 0 ] ; then spark = "off" ; fi
2022-01-26 00:42:54 +01:00
if [ ${# tallycoinConnect } -eq 0 ] ; then tallycoinConnect = "off" ; fi
2022-02-19 15:45:02 +01:00
if [ ${# helipad } -eq 0 ] ; then helipad = "off" ; fi
2022-02-10 21:48:53 +01:00
if [ ${# bitcoinminds } -eq 0 ] ; then bitcoinminds = "off" ; fi
2021-11-27 01:56:14 +01:00
if [ ${# squeaknode } -eq 0 ] ; then squeaknode = "off" ; fi
2022-05-21 12:05:00 +02:00
if [ ${# itchysats } -eq 0 ] ; then itchysats = "off" ; fi
2020-03-22 07:26:45 +01:00
2018-10-15 14:43:09 +02:00
# show select dialog
2019-01-18 23:38:36 +01:00
echo "run dialog ..."
2019-06-14 00:25:49 +02:00
2020-06-18 00:18:42 +02:00
OPTIONS = ( )
2021-08-30 23:35:55 +02:00
# just available for BTC
2021-08-30 23:38:08 +02:00
if [ " ${ network } " = = "bitcoin" ] ; then
2021-08-30 23:35:55 +02:00
OPTIONS += ( e 'BTC Electrum Rust Server' ${ ElectRS } )
OPTIONS += ( p 'BTC PayServer' ${ BTCPayServer } )
OPTIONS += ( b 'BTC RPC-Explorer' ${ BTCRPCexplorer } )
OPTIONS += ( s 'BTC Specter Desktop' ${ specter } )
OPTIONS += ( a 'BTC Mempool Space' ${ mempoolExplorer } )
OPTIONS += ( j 'BTC JoinMarket+JoininBox menu' ${ joinmarket } )
OPTIONS += ( w 'BTC Download Bitcoin Whitepaper' ${ whitepaper } )
2022-02-10 21:48:53 +01:00
OPTIONS += ( v 'BTC Install BitcoinMinds.org' ${ bitcoinminds } )
2022-05-21 12:05:00 +02:00
OPTIONS += ( u 'BTC Install ItchySats' ${ itchysats } )
2021-08-30 23:35:55 +02:00
fi
2021-08-04 00:18:30 +02:00
2021-12-16 20:10:03 +01:00
# available for both LND & c-lightning
if [ " ${ lnd } " = = "on" ] || [ " ${ cl } " = = "on" ] ; then
OPTIONS += ( i 'LNbits (Lightning Accounts)' ${ LNBits } )
fi
2021-08-04 00:18:30 +02:00
# just available for LND
2021-08-30 23:35:55 +02:00
if [ " ${ lightning } " = = "lnd" ] || [ " ${ lnd } " = = "on" ] ; then
OPTIONS += ( r 'LND RTL Webinterface' ${ rtlWebinterface } )
OPTIONS += ( t 'LND ThunderHub' ${ thunderhub } )
OPTIONS += ( l 'LND LIT (loop, pool, faraday)' ${ lit } )
OPTIONS += ( o 'LND Balance of Satoshis' ${ bos } )
OPTIONS += ( y 'LND PyBLOCK' ${ pyblock } )
OPTIONS += ( h 'LND ChannelTools (Fund Rescue)' ${ chantools } )
OPTIONS += ( x 'LND Sphinx-Relay' ${ sphinxrelay } )
2022-02-19 15:45:02 +01:00
OPTIONS += ( f 'LND Helipad Boostagram reader' ${ helipad } )
2022-01-26 00:42:54 +01:00
OPTIONS += ( d 'LND Tallycoin Connect' ${ tallycoinConnect } )
2022-06-02 15:08:00 +02:00
#OPTIONS+=(q 'LND Squeaknode' ${squeaknode})
2021-08-04 00:18:30 +02:00
fi
2021-09-26 11:30:09 +02:00
# just available for CL
if [ " ${ lightning } " = = "cl" ] || [ " ${ cl } " = = "on" ] ; then
2021-08-30 23:35:55 +02:00
OPTIONS += ( c 'C-Lightning RTL Webinterface' ${ crtlWebinterface } )
OPTIONS += ( k 'C-Lightning Sparko WebWallet' ${ sparko } )
2021-10-02 15:14:04 +02:00
OPTIONS += ( n 'C-Lightning Spark Wallet' ${ spark } )
2021-08-04 00:18:30 +02:00
fi
2022-05-17 22:08:25 +02:00
OPTIONS += ( m 'Homer Dashboard' ${ homer } )
2021-08-30 23:35:55 +02:00
CHOICES = $( dialog --title ' Additional Mainnet Services ' \
2021-04-08 00:24:55 +02:00
--checklist ' use spacebar to activate/de-activate ' \
2022-02-18 20:54:02 +01:00
27 55 20 " ${ OPTIONS [@] } " 2>& 1 >/dev/tty)
2019-06-14 00:25:49 +02:00
2018-10-16 00:04:20 +02:00
dialogcancel = $?
2019-01-18 23:38:36 +01:00
echo "done dialog"
2018-10-15 14:43:09 +02:00
clear
# check if user canceled dialog
2019-01-18 23:38:36 +01:00
echo " dialogcancel( ${ dialogcancel } ) "
2018-10-16 00:04:20 +02:00
if [ ${ dialogcancel } -eq 1 ] ; then
2018-10-15 14:43:09 +02:00
echo "user canceled"
2021-08-04 00:18:30 +02:00
exit 0
2020-02-02 12:25:40 +01:00
elif [ ${ dialogcancel } -eq 255 ] ; then
echo "ESC pressed"
2021-08-04 00:18:30 +02:00
exit 0
2018-10-15 14:43:09 +02:00
fi
2018-12-01 20:25:33 +01:00
needsReboot = 0
2019-02-11 19:59:09 +01:00
anychange = 0
2018-12-01 20:25:33 +01:00
2021-08-04 09:58:38 +02:00
# RTL process choice (LND)
2020-06-18 00:43:39 +02:00
choice = "off" ; check = $( echo " ${ CHOICES } " | grep -c "r" )
2018-12-02 19:52:01 +01:00
if [ ${ check } -eq 1 ] ; then choice = "on" ; fi
2021-08-04 09:58:38 +02:00
2018-12-02 19:52:01 +01:00
if [ " ${ rtlWebinterface } " != " ${ choice } " ] ; then
2021-08-04 09:58:38 +02:00
echo "RTL-lnd Webinterface Setting changed .."
2019-02-18 11:32:27 +01:00
anychange = 1
2021-08-31 00:01:43 +02:00
/home/admin/config.scripts/bonus.rtl.sh ${ choice } lnd mainnet
2019-03-13 18:13:49 +01:00
errorOnInstall = $?
2018-12-03 23:25:55 +01:00
if [ " ${ choice } " = "on" ] ; then
2019-03-13 18:13:49 +01:00
if [ ${ errorOnInstall } -eq 0 ] ; then
2019-12-25 01:41:31 +01:00
sudo systemctl start RTL
2020-01-26 23:41:28 +01:00
echo "waiting 10 secs .."
sleep 10
2021-08-31 00:01:43 +02:00
/home/admin/config.scripts/bonus.rtl.sh menu lnd mainnet
2019-03-13 18:13:49 +01:00
else
2022-07-18 22:07:14 +02:00
l1 = "# FAIL on RTL lnd install #"
2019-11-24 14:12:55 +01:00
l2 = "Try manual install on terminal after reboot with:"
2021-08-31 00:01:43 +02:00
l3 = "/home/admin/config.scripts/bonus.rtl.sh on lnd mainnet"
2019-11-24 14:12:55 +01:00
dialog --title 'FAIL' --msgbox " ${ l1 } \n ${ l2 } \n ${ l3 } " 7 65
2019-03-13 18:13:49 +01:00
fi
2018-12-02 19:52:01 +01:00
fi
2018-12-02 23:50:14 +01:00
else
2021-08-04 09:58:38 +02:00
echo "RTL-lnd Webinterface Setting unchanged."
fi
# RTL process choice (C-Lightning)
choice = "off" ; check = $( echo " ${ CHOICES } " | grep -c "c" )
if [ ${ check } -eq 1 ] ; then choice = "on" ; fi
if [ " ${ crtlWebinterface } " != " ${ choice } " ] ; then
2021-09-26 11:30:09 +02:00
echo "RTL-cl Webinterface Setting changed .."
2019-02-18 11:32:27 +01:00
anychange = 1
2021-09-26 11:30:09 +02:00
/home/admin/config.scripts/bonus.rtl.sh ${ choice } cl mainnet
2019-03-13 18:13:49 +01:00
errorOnInstall = $?
2018-12-03 23:25:55 +01:00
if [ " ${ choice } " = "on" ] ; then
2019-03-13 18:13:49 +01:00
if [ ${ errorOnInstall } -eq 0 ] ; then
2019-12-25 01:41:31 +01:00
sudo systemctl start RTL
2020-01-26 23:41:28 +01:00
echo "waiting 10 secs .."
sleep 10
2021-09-26 11:30:09 +02:00
/home/admin/config.scripts/bonus.rtl.sh menu cl mainnet
2019-03-13 18:13:49 +01:00
else
2022-07-18 22:07:14 +02:00
l1 = "# FAIL on RTL C-Lightning install #"
2019-11-24 14:12:55 +01:00
l2 = "Try manual install on terminal after reboot with:"
2021-09-26 11:30:09 +02:00
l3 = "/home/admin/config.scripts/bonus.rtl.sh on cl mainnet"
2019-11-24 14:12:55 +01:00
dialog --title 'FAIL' --msgbox " ${ l1 } \n ${ l2 } \n ${ l3 } " 7 65
2019-03-13 18:13:49 +01:00
fi
2018-12-02 19:52:01 +01:00
fi
2018-12-02 23:50:14 +01:00
else
2021-09-26 11:30:09 +02:00
echo "RTL-cl Webinterface Setting unchanged."
2018-12-01 22:24:32 +01:00
fi
2019-11-24 14:12:55 +01:00
# BTC-RPC-Explorer process choice
choice = "off" ; check = $( echo " ${ CHOICES } " | grep -c "b" )
if [ ${ check } -eq 1 ] ; then choice = "on" ; fi
if [ " ${ BTCRPCexplorer } " != " ${ choice } " ] ; then
echo "RTL Webinterface Setting changed .."
anychange = 1
/home/admin/config.scripts/bonus.btc-rpc-explorer.sh ${ choice }
errorOnInstall = $?
if [ " ${ choice } " = "on" ] ; then
if [ ${ errorOnInstall } -eq 0 ] ; then
2021-09-04 18:45:05 +02:00
sudo systemctl start btc-rpc-explorer
2020-01-27 02:26:45 +01:00
whiptail --title " Installed BTC-RPC-Explorer " --msgbox " \
The txindex may need to be created before BTC-RPC-Explorer can be active.\n
This can take ~7 hours on a RPi4 with SSD. Monitor the progress on the LCD.\n
When finished use the new 'EXPLORE' entry in Main Menu for more info.\n
" 14 50
2020-01-23 11:20:43 +01:00
needsReboot = 1
2019-11-24 14:12:55 +01:00
else
2022-07-18 22:07:14 +02:00
l1 = "# FAIL on BTC-RPC-Explorer install #"
2019-11-24 14:12:55 +01:00
l2 = "Try manual install on terminal after reboot with:"
l3 = "/home/admin/config.scripts/bonus.btc-rpc-explorer.sh on"
dialog --title 'FAIL' --msgbox " ${ l1 } \n ${ l2 } \n ${ l3 } " 7 65
fi
fi
else
echo "BTC-RPC-Explorer Setting unchanged."
fi
2021-08-23 18:23:01 +02:00
# Specter Desktop process choice
2020-03-16 15:11:39 +01:00
choice = "off" ; check = $( echo " ${ CHOICES } " | grep -c "s" )
if [ ${ check } -eq 1 ] ; then choice = "on" ; fi
if [ " ${ specter } " != " ${ choice } " ] ; then
2021-08-23 18:23:01 +02:00
echo "Specter Desktop Setting changed .."
2020-03-16 15:11:39 +01:00
anychange = 1
2021-08-23 18:23:01 +02:00
/home/admin/config.scripts/bonus.specter.sh ${ choice }
2020-03-16 15:11:39 +01:00
errorOnInstall = $?
if [ " ${ choice } " = "on" ] ; then
if [ ${ errorOnInstall } -eq 0 ] ; then
2021-08-23 18:23:01 +02:00
sudo systemctl start specter
/home/admin/config.scripts/bonus.specter.sh menu
2020-03-16 15:11:39 +01:00
else
2022-07-18 22:07:14 +02:00
l1 = "# FAIL on Specter Desktop install #"
2020-03-16 15:11:39 +01:00
l2 = "Try manual install on terminal after reboot with:"
2021-08-23 18:23:01 +02:00
l3 = "/home/admin/config.scripts/bonus.specter.sh on"
2020-03-16 15:11:39 +01:00
dialog --title 'FAIL' --msgbox " ${ l1 } \n ${ l2 } \n ${ l3 } " 7 65
fi
fi
else
2021-08-23 18:23:01 +02:00
echo "Specter Desktop Setting unchanged."
2020-03-16 15:11:39 +01:00
fi
2019-12-04 12:18:56 +01:00
# ElectRS process choice
choice = "off" ; check = $( echo " ${ CHOICES } " | grep -c "e" )
if [ ${ check } -eq 1 ] ; then choice = "on" ; fi
if [ " ${ ElectRS } " != " ${ choice } " ] ; then
echo "ElectRS Setting changed .."
anychange = 1
2020-01-27 23:55:12 +01:00
extraparameter = ""
2020-05-01 21:40:25 +02:00
if [ " ${ choice } " = "on" ] ; then
# check on HDD size
source <( sudo /home/admin/config.scripts/blitz.datadrive.sh status)
if [ ${ hddGigaBytes } -lt 800 ] ; then
whiptail --title " HDD/SSD TOO SMALL " --msgbox " \
Since v1.5 we recommend at least a 1TB HDD/SSD if you want to run ElectRS.\n
This is due to the eletcrum index that will grow over time and needs space.\n
To migrate to a bigger HDD/SSD check RaspiBlitz README on 'migration' .\n
" 14 50
else
/home/admin/config.scripts/bonus.electrs.sh on ${ extraparameter }
errorOnInstall = $?
if [ ${ errorOnInstall } -eq 0 ] ; then
sudo systemctl start electrs
whiptail --title " Installed ElectRS Server " --msgbox " \
The index database needs to be created before Electrum Server can be used.\n
This can take hours/days depending on your RaspiBlitz. Monitor the progress on the LCD.\n
When finished use the new 'ELECTRS' entry in Main Menu for more info.\n
" 14 50
2021-09-20 11:49:04 +02:00
needsReboot = 0
2020-05-01 21:40:25 +02:00
else
2022-07-18 22:07:14 +02:00
l1 = "# FAIL on ElectRS install #"
2020-05-01 21:40:25 +02:00
l2 = "Try manual install on terminal after reboot with:"
l3 = "/home/admin/config.scripts/bonus.electrs.sh on"
dialog --title 'FAIL' --msgbox " ${ l1 } \n ${ l2 } \n ${ l3 } " 7 65
fi
fi
fi
2020-01-27 23:55:12 +01:00
if [ " ${ choice } " = "off" ] ; then
whiptail --title "Delete Electrum Index?" \
--yes-button "Keep Index" \
--no-button "Delete Index" \
--yesno "ElectRS is getting uninstalled. Do you also want to delete the Electrum Index? It contains no important data, but can take multiple hours to rebuild if needed again." 10 60
if [ $? -eq 1 ] ; then
extraparameter = "deleteindex"
fi
2020-05-01 21:40:25 +02:00
/home/admin/config.scripts/bonus.electrs.sh off ${ extraparameter }
2020-05-31 00:51:32 +02:00
fi
2020-05-01 21:40:25 +02:00
2019-12-04 12:18:56 +01:00
else
echo "ElectRS Setting unchanged."
fi
2019-12-04 09:13:21 +01:00
# BTCPayServer process choice
choice = "off" ; check = $( echo " ${ CHOICES } " | grep -c "p" )
if [ ${ check } -eq 1 ] ; then choice = "on" ; fi
if [ " ${ BTCPayServer } " != " ${ choice } " ] ; then
echo "BTCPayServer setting changed .."
2020-03-23 06:47:36 +01:00
# check if TOR is installed
source /mnt/hdd/raspiblitz.conf
2020-03-23 07:34:26 +01:00
if [ " ${ choice } " = "on" ] && [ " ${ runBehindTor } " = "off" ] ; then
2020-03-23 06:47:36 +01:00
whiptail --title " BTCPayServer needs TOR " --msgbox " \
At the moment the BTCPayServer on the RaspiBlitz needs TOR.\n
2020-03-23 07:36:57 +01:00
Please activate TOR in SERVICES first.\n
2020-03-23 07:15:27 +01:00
Then try activating BTCPayServer again in SERVICES.\n
2020-03-23 07:36:57 +01:00
" 13 42
2020-03-23 06:47:36 +01:00
else
anychange = 1
/home/admin/config.scripts/bonus.btcpayserver.sh ${ choice } tor
errorOnInstall = $?
if [ " ${ choice } " = "on" ] ; then
if [ ${ errorOnInstall } -eq 0 ] ; then
source /home/btcpay/.btcpayserver/Main/settings.config
2020-03-23 07:34:26 +01:00
whiptail --title " Installed BTCPay Server " --msgbox " \
2020-01-27 06:44:10 +01:00
BTCPay server was installed.\n
Use the new 'BTCPay' entry in Main Menu for more info.\n
" 10 35
2020-03-23 06:47:36 +01:00
else
l1 = "BTCPayServer installation is cancelled"
l2 = "Try again from the menu or install from the terminal with:"
l3 = "/home/admin/config.scripts/bonus.btcpayserver.sh on"
dialog --title 'FAIL' --msgbox " ${ l1 } \n ${ l2 } \n ${ l3 } " 7 65
fi
2019-12-04 09:13:21 +01:00
fi
fi
else
echo "BTCPayServer setting not changed."
fi
2019-12-17 19:33:18 +01:00
# LNDMANAGE process choice
2022-06-01 17:22:57 +02:00
choice = "off" ; check = $( echo " ${ CHOICES } " | grep -c "ä" )
2019-12-17 19:33:18 +01:00
if [ ${ check } -eq 1 ] ; then choice = "on" ; fi
if [ " ${ lndmanage } " != " ${ choice } " ] ; then
echo "lndmanage Setting changed .."
anychange = 1
2020-01-20 23:12:55 +01:00
sudo -u admin /home/admin/config.scripts/bonus.lndmanage.sh ${ choice }
2020-02-19 17:05:07 +01:00
source /mnt/hdd/raspiblitz.conf
if [ " ${ lndmanage } " = "on" ] ; then
2020-01-26 22:30:26 +01:00
sudo -u admin /home/admin/config.scripts/bonus.lndmanage.sh menu
2019-12-17 20:28:03 +01:00
fi
2020-05-31 00:51:32 +02:00
else
2019-12-17 19:33:18 +01:00
echo "lndmanage setting unchanged."
fi
2021-03-23 20:15:39 +01:00
# CHANTOOLS process choice
2021-08-04 00:18:30 +02:00
choice = "off" ; check = $( echo " ${ CHOICES } " | grep -c "h" )
2021-03-23 20:15:39 +01:00
if [ ${ check } -eq 1 ] ; then choice = "on" ; fi
if [ " ${ chantools } " != " ${ choice } " ] ; then
echo "chantools Setting changed .."
anychange = 1
sudo -u admin /home/admin/config.scripts/bonus.chantools.sh ${ choice }
source /mnt/hdd/raspiblitz.conf
if [ " ${ chantools } " = "on" ] ; then
sudo -u admin /home/admin/config.scripts/bonus.chantools.sh menu
fi
else
echo "chantools setting unchanged."
fi
2020-05-18 16:25:39 +02:00
# Balance of Satoshis process choice
choice = "off" ; check = $( echo " ${ CHOICES } " | grep -c "o" )
if [ ${ check } -eq 1 ] ; then choice = "on" ; fi
if [ " ${ bos } " != " ${ choice } " ] ; then
echo "Balance of Satoshis Setting changed .."
anychange = 1
sudo -u admin /home/admin/config.scripts/bonus.bos.sh ${ choice }
source /mnt/hdd/raspiblitz.conf
if [ " ${ bos } " = "on" ] ; then
2020-06-01 12:52:40 +02:00
sudo -u admin /home/admin/config.scripts/bonus.bos.sh menu
2020-05-18 16:25:39 +02:00
fi
2020-05-31 00:51:32 +02:00
else
2020-05-18 16:25:39 +02:00
echo "Balance of Satoshis setting unchanged."
fi
2020-10-18 15:29:17 +02:00
# PyBLOCK process choice
choice = "off" ; check = $( echo " ${ CHOICES } " | grep -c "y" )
if [ ${ check } -eq 1 ] ; then choice = "on" ; fi
if [ " ${ pyblock } " != " ${ choice } " ] ; then
echo "PyBLOCK Setting changed .."
anychange = 1
sudo -u admin /home/admin/config.scripts/bonus.pyblock.sh ${ choice }
source /mnt/hdd/raspiblitz.conf
if [ " ${ pyblock } " = "on" ] ; then
sudo -u admin /home/admin/config.scripts/bonus.pyblock.sh menu
fi
else
echo "PyBLOCK setting unchanged."
fi
2020-06-01 12:52:40 +02:00
# thunderhub process choice
2020-06-02 19:18:57 +02:00
choice = "off" ; check = $( echo " ${ CHOICES } " | grep -c "t" )
2020-06-01 12:52:40 +02:00
if [ ${ check } -eq 1 ] ; then choice = "on" ; fi
if [ " ${ thunderhub } " != " ${ choice } " ] ; then
2020-06-03 11:30:36 +02:00
echo "ThunderHub Setting changed .."
2020-06-01 12:52:40 +02:00
anychange = 1
2020-06-03 11:30:36 +02:00
/home/admin/config.scripts/bonus.thunderhub.sh ${ choice }
errorOnInstall = $?
if [ " ${ choice } " = "on" ] ; then
if [ ${ errorOnInstall } -eq 0 ] ; then
sudo systemctl start thunderhub
echo "waiting 10 secs .."
sleep 10
/home/admin/config.scripts/bonus.thunderhub.sh menu
else
2022-07-18 22:07:14 +02:00
l1 = "# FAIL on ThunderHub install #"
2020-06-03 11:30:36 +02:00
l2 = "Try manual install on terminal after reboot with:"
l3 = "/home/admin/config.scripts/bonus.thunderhub.sh on"
dialog --title 'FAIL' --msgbox " ${ l1 } \n ${ l2 } \n ${ l3 } " 7 65
fi
2020-06-01 12:52:40 +02:00
fi
2020-06-14 16:03:16 +02:00
else
2020-06-01 12:52:40 +02:00
echo "ThunderHub setting unchanged."
fi
2020-04-22 20:57:32 +02:00
# LNbits process choice
2020-02-10 20:46:23 +01:00
choice = "off" ; check = $( echo " ${ CHOICES } " | grep -c "i" )
2020-02-10 20:44:41 +01:00
if [ ${ check } -eq 1 ] ; then choice = "on" ; fi
2020-04-23 23:10:30 +02:00
if [ " ${ LNBits } " != " ${ choice } " ] ; then
2020-04-22 20:57:32 +02:00
echo "LNbits Setting changed .."
2020-02-10 20:44:41 +01:00
anychange = 1
2021-12-16 20:10:03 +01:00
sudo -u admin /home/admin/config.scripts/bonus.lnbits.sh ${ choice } ${ lightning }
2020-02-10 20:44:41 +01:00
if [ " ${ choice } " = "on" ] ; then
2020-02-10 21:43:35 +01:00
sudo systemctl start lnbits
2020-02-10 20:44:41 +01:00
sudo -u admin /home/admin/config.scripts/bonus.lnbits.sh menu
fi
2020-05-31 00:51:32 +02:00
else
2020-04-28 09:45:14 +02:00
echo "LNbits setting unchanged."
2020-02-10 20:44:41 +01:00
fi
2021-03-18 22:46:58 +01:00
# LIT (Lightning Terminal)
choice = "off" ; check = $( echo " ${ CHOICES } " | grep -c "l" )
2020-11-06 18:13:06 +01:00
if [ ${ check } -eq 1 ] ; then choice = "on" ; fi
2021-03-18 22:46:58 +01:00
if [ " ${ lit } " != " ${ choice } " ] ; then
echo "LIT Setting changed .."
2020-11-06 18:13:06 +01:00
anychange = 1
2021-03-18 22:46:58 +01:00
sudo -u admin /home/admin/config.scripts/bonus.lit.sh ${ choice }
2020-11-06 18:13:06 +01:00
if [ " ${ choice } " = "on" ] ; then
2021-03-18 22:46:58 +01:00
sudo systemctl start lnbits
sudo -u admin /home/admin/config.scripts/bonus.lit.sh menu
2020-11-06 18:13:06 +01:00
fi
else
2021-03-18 22:46:58 +01:00
echo "LIT setting unchanged."
2020-11-06 18:13:06 +01:00
fi
2020-11-15 22:07:53 +01:00
# Sphinx Relay
choice = "off" ; check = $( echo " ${ CHOICES } " | grep -c "x" )
if [ ${ check } -eq 1 ] ; then choice = "on" ; fi
if [ " ${ sphinxrelay } " != " ${ choice } " ] ; then
echo "Sphinx-Relay Setting changed .."
anychange = 1
sudo -u admin /home/admin/config.scripts/bonus.sphinxrelay.sh ${ choice }
if [ " ${ choice } " = "on" ] ; then
2021-04-18 22:58:48 +02:00
echo "Giving service 1 minute to start up ... (please wait) ..."
sleep 60
2020-12-18 22:10:36 +01:00
whiptail --title " Installed Sphinx Server" --msgbox " \
Sphinx Server was installed.\n
Use the new 'SPHINX' entry in Main Menu for more info.\n
" 10 35
2020-11-15 22:07:53 +01:00
fi
else
echo "Sphinx Relay unchanged."
fi
2022-02-19 15:45:02 +01:00
# Helipad
2022-02-19 15:59:19 +01:00
choice = "off" ; check = $( echo " ${ CHOICES } " | grep -c "f" )
2022-02-19 15:45:02 +01:00
if [ ${ check } -eq 1 ] ; then choice = "on" ; fi
if [ " ${ helipad } " != " ${ choice } " ] ; then
echo "Helipad setting changed .."
anychange = 1
sudo -u admin /home/admin/config.scripts/bonus.helipad.sh ${ choice }
if [ " ${ choice } " = "on" ] ; then
sudo systemctl start helipad
sudo -u admin /home/admin/config.scripts/bonus.helipad.sh menu
fi
else
echo "Helipad setting unchanged."
fi
2022-01-26 00:42:54 +01:00
# Tallycoin
choice = "off" ; check = $( echo " ${ CHOICES } " | grep -c "d" )
if [ ${ check } -eq 1 ] ; then choice = "on" ; fi
if [ " ${ tallycoinConnect } " != " ${ choice } " ] ; then
echo "Tallycoin Setting changed .."
anychange = 1
sudo -u admin /home/admin/config.scripts/bonus.tallycoin-connect.sh ${ choice }
if [ " ${ choice } " = "on" ] ; then
whiptail --title " Installed Tallycoin-Connect" --msgbox " \
Tallycoin-Connect was installed.\n
Use the new 'TALLY' entry in Main Menu for more info.\n
" 10 45
fi
else
echo "Tallycoin Setting unchanged."
fi
2020-03-24 15:31:25 +01:00
# JoinMarket process choice
choice = "off" ; check = $( echo " ${ CHOICES } " | grep -c "j" )
if [ ${ check } -eq 1 ] ; then choice = "on" ; fi
if [ " ${ joinmarket } " != " ${ choice } " ] ; then
echo "JoinMarket setting changed .."
# check if TOR is installed
source /mnt/hdd/raspiblitz.conf
if [ " ${ choice } " = "on" ] && [ " ${ runBehindTor } " = "off" ] ; then
whiptail --title " Use Tor with JoinMarket" --msgbox " \
It is highly recommended to use Tor with JoinMarket.\n
Please activate TOR in SERVICES first.\n
Then try activating JoinMarket again in SERVICES.\n
" 13 42
else
anychange = 1
sudo /home/admin/config.scripts/bonus.joinmarket.sh ${ choice }
errorOnInstall = $?
if [ " ${ choice } " = "on" ] ; then
if [ ${ errorOnInstall } -eq 0 ] ; then
sudo /home/admin/config.scripts/bonus.joinmarket.sh menu
else
2020-03-25 05:05:15 +01:00
whiptail --title 'FAIL' --msgbox "JoinMarket installation is cancelled\nTry again from the menu or install from the terminal with:\nsudo /home/admin/config.scripts/bonus.joinmarket.sh on" 9 65
2020-03-24 15:31:25 +01:00
fi
fi
fi
else
echo "JoinMarket not changed."
fi
2020-10-07 13:10:19 +02:00
# Mempool process choice
choice = "off" ; check = $( echo " ${ CHOICES } " | grep -c "a" )
if [ ${ check } -eq 1 ] ; then choice = "on" ; fi
2020-10-07 22:21:19 +02:00
if [ " ${ mempoolExplorer } " != " ${ choice } " ] ; then
echo "Mempool Explorer settings changed .."
2020-10-07 13:10:19 +02:00
anychange = 1
/home/admin/config.scripts/bonus.mempool.sh ${ choice }
errorOnInstall = $?
if [ " ${ choice } " = "on" ] ; then
if [ ${ errorOnInstall } -eq 0 ] ; then
2021-01-13 16:11:30 +01:00
sudo systemctl start mempool
2020-10-07 13:10:19 +02:00
whiptail --title " Installed Mempool Space " --msgbox " \
The txindex may need to be created before Mempool can be active.\n
This can take ~7 hours on a RPi4 with SSD. Monitor the progress on the LCD.\n
2020-10-30 13:29:26 +01:00
When finished use the new 'MEMPOOL' entry in Main Menu for more info.\n
2020-10-07 13:10:19 +02:00
" 14 50
else
2022-07-18 22:07:14 +02:00
l1 = "# FAIL on Mempool Explorer install #"
2020-10-07 13:10:19 +02:00
l2 = "Try manual install on terminal after reboot with:"
l3 = "/home/admin/config.scripts/bonus.mempool.sh on"
dialog --title 'FAIL' --msgbox " ${ l1 } \n ${ l2 } \n ${ l3 } " 7 65
fi
fi
else
2020-10-07 22:21:19 +02:00
echo "Mempool Explorer Setting unchanged."
2020-10-07 13:10:19 +02:00
fi
2021-03-22 23:36:21 +01:00
# Whitepaper process choice
choice = "off" ; check = $( echo " ${ CHOICES } " | grep -c "w" )
if [ ${ check } -eq 1 ] ; then choice = "on" ; fi
if [ " ${ whitepaper } " != " ${ choice } " ] ; then
echo "Whitepaper setting changed .."
anychange = 1
sudo -u admin /home/admin/config.scripts/bonus.whitepaper.sh ${ choice }
source /mnt/hdd/raspiblitz.conf
if [ " ${ whitepaper } " = "on" ] ; then
sudo -u admin /home/admin/config.scripts/bonus.whitepaper.sh menu
fi
else
echo "Whitepaper setting unchanged."
fi
2022-05-17 22:08:25 +02:00
# Homer process choice
choice = "off" ; check = $( echo " ${ CHOICES } " | grep -c "m" )
if [ ${ check } -eq 1 ] ; then choice = "on" ; fi
if [ " ${ homer } " != " ${ choice } " ] ; then
echo "Homer settings changed .."
anychange = 1
/home/admin/config.scripts/bonus.homer.sh ${ choice }
errorOnInstall = $?
if [ " ${ choice } " = "on" ] ; then
whiptail --title " Installed Homer" --msgbox " \
Homer was installed.\n
Use the new 'Homer' entry in Main Menu for more info.\n
" 10 35
fi
else
echo "Homer Setting unchanged."
fi
2022-02-10 21:48:53 +01:00
# BitcoinMinds process choice
choice = "off" ; check = $( echo " ${ CHOICES } " | grep -c "v" )
if [ ${ check } -eq 1 ] ; then choice = "on" ; fi
if [ " ${ bitcoinminds } " != " ${ choice } " ] ; then
echo "BitcoinMinds setting changed."
anychange = 1
sudo -u admin /home/admin/config.scripts/bonus.bitcoinminds.sh ${ choice }
source /mnt/hdd/raspiblitz.conf
if [ " ${ bitcoinminds } " = "on" ] ; then
sudo -u admin /home/admin/config.scripts/bonus.bitcoinminds.sh menu
fi
else
echo "BitcoinMinds setting unchanged."
fi
2021-08-04 00:18:30 +02:00
# sparko process choice
choice = "off" ; check = $( echo " ${ CHOICES } " | grep -c "k" )
if [ ${ check } -eq 1 ] ; then choice = "on" ; fi
if [ " ${ sparko } " != " ${ choice } " ] ; then
echo "# Sparko on mainnet Setting changed .."
anychange = 1
2021-09-26 11:30:09 +02:00
/home/admin/config.scripts/cl-plugin.sparko.sh ${ choice } mainnet
2021-08-04 00:18:30 +02:00
errorOnInstall = $?
if [ " ${ choice } " = "on" ] ; then
if [ ${ errorOnInstall } -eq 0 ] ; then
2021-09-26 11:30:09 +02:00
/home/admin/config.scripts/cl-plugin.sparko.sh menu mainnet
2021-08-04 00:18:30 +02:00
else
2022-07-18 22:07:14 +02:00
l1 = "# FAIL on Sparko on mainnet install #"
2021-08-04 00:18:30 +02:00
l2 = "# Try manual install on terminal after reboot with:"
2021-09-26 11:30:09 +02:00
l3 = "/home/admin/config.scripts/cl-plugin.sparko.sh on mainnet"
2021-08-04 00:18:30 +02:00
dialog --title 'FAIL' --msgbox " ${ l1 } \n ${ l2 } \n ${ l3 } " 7 65
fi
fi
else
echo "# Sparko on mainnet Setting unchanged."
fi
2021-10-01 13:14:42 +02:00
# spark wallet process choice
2021-10-02 15:14:04 +02:00
choice = "off" ; check = $( echo " ${ CHOICES } " | grep -c "n" )
2021-10-01 13:14:42 +02:00
if [ ${ check } -eq 1 ] ; then choice = "on" ; fi
if [ " ${ spark } " != " ${ choice } " ] ; then
echo "# Spark Wallet on mainnet Setting changed .."
anychange = 1
/home/admin/config.scripts/cl.spark.sh ${ choice } mainnet
errorOnInstall = $?
if [ " ${ choice } " = "on" ] ; then
if [ ${ errorOnInstall } -eq 0 ] ; then
/home/admin/config.scripts/cl.spark.sh menu mainnet
else
2022-07-18 22:07:14 +02:00
l1 = "# FAIL on Spark Wallet on mainnet install #"
2021-10-01 13:14:42 +02:00
l2 = "# Try manual install on terminal after reboot with:"
l3 = "/home/admin/config.scripts/cl.spark.sh on mainnet"
dialog --title 'FAIL' --msgbox " ${ l1 } \n ${ l2 } \n ${ l3 } " 7 65
fi
fi
else
echo "# Spark Wallet on mainnet Setting unchanged."
fi
2021-11-27 01:56:14 +01:00
# squeaknode process choice
choice = "off" ; check = $( echo " ${ CHOICES } " | grep -c "q" )
if [ ${ check } -eq 1 ] ; then choice = "on" ; fi
if [ " ${ squeaknode } " != " ${ choice } " ] ; then
echo "squeaknode Setting changed .."
anychange = 1
sudo -u admin /home/admin/config.scripts/bonus.squeaknode.sh ${ choice }
if [ " ${ choice } " = "on" ] ; then
sudo systemctl start squeaknode
sudo -u admin /home/admin/config.scripts/bonus.squeaknode.sh menu
fi
else
echo "squeaknode setting unchanged."
fi
2022-05-21 12:05:00 +02:00
# ItchySats process choice
choice = "off" ; check = $( echo " ${ CHOICES } " | grep -c "u" )
if [ ${ check } -eq 1 ] ; then choice = "on" ; fi
if [ " ${ itchysats } " != " ${ choice } " ] ; then
echo "ItchySats setting changed .."
anychange = 1
2022-06-01 21:58:02 +02:00
sudo -u admin /home/admin/config.scripts/bonus.itchysats.sh ${ choice } --download
2022-05-21 12:05:00 +02:00
if [ " ${ choice } " = "on" ] ; then
sudo systemctl start itchysats
sudo -u admin /home/admin/config.scripts/bonus.itchysats.sh menu
fi
else
echo "ItchySats setting unchanged."
fi
2019-02-11 20:06:19 +01:00
if [ ${ anychange } -eq 0 ] ; then
2019-07-29 00:49:00 +02:00
dialog --msgbox "NOTHING CHANGED!\nUse Spacebar to check/uncheck services." 8 58
2019-02-11 20:06:19 +01:00
exit 0
2019-02-11 19:59:09 +01:00
fi
2018-12-01 20:25:33 +01:00
if [ ${ needsReboot } -eq 1 ] ; then
2018-12-02 19:52:01 +01:00
sleep 2
2018-12-24 14:57:47 +01:00
dialog --pause "OK. System will reboot to activate changes." 8 58 8
2019-01-17 23:12:30 +01:00
clear
2018-12-24 14:57:47 +01:00
echo "rebooting .. (please wait)"
2019-01-28 16:55:51 +01:00
# stop bitcoind
sudo -u bitcoin ${ network } -cli stop
sleep 4
2021-08-04 00:18:30 +02:00
sudo /home/admin/config.scripts/blitz.shutdown.sh reboot
2019-03-28 03:51:46 +01:00
fi