Add Loop Info to Main Menu

This commit is contained in:
rootzoll 2020-01-26 23:06:03 +01:00
parent 6614d216d3
commit 630244d872
4 changed files with 21 additions and 18 deletions

View File

@ -40,7 +40,10 @@ if [ "${ElectRS}" == "on" ]; then
OPTIONS+=(ELECTRS "Electrum Rust Server")
fi
if [ "${lndmanage}" == "on" ]; then
OPTIONS+=(lndmanage "Electrum Rust Server")
OPTIONS+=(LNDMANAGE "LND Manage Info")
fi
if [ "${lndmanage}" == "on" ]; then
OPTIONS+=(LOOP "Loop In/Out Info")
fi
# Basic Options
@ -133,10 +136,14 @@ case $CHOICE in
/home/admin/config.scripts/bonus.electrs.sh menu
./00mainMenu.sh
;;
lndmanage)
LNDMANAGE)
/home/admin/config.scripts/bonus.lndmanage.sh menu
./00mainMenu.sh
;;
LOOP)
/home/admin/config.scripts/bonus.loop.sh menu
./00mainMenu.sh
;;
lnchannels)
lnchannels ${network}
echo "Press ENTER to return to main menu."

View File

@ -214,20 +214,8 @@ if [ "${loop}" != "${choice}" ]; then
if [ "${choice}" = "on" ]; then
if [ ${errorOnInstall} -eq 0 ]; then
sudo systemctl start loopd
if [ ${#GOPATH} -eq 0 ]; then
whiptail --title " Installed the Lightning Loop Service (loopd) " --msgbox "\
Usage and examples: https://github.com/lightninglabs/loop#loop-out-swaps\n
Start from the command line after the reboot.
Use the command 'loop' to see the options.
" 11 56
needsReboot=1
else
whiptail --title " Installed the Lightning Loop Service (loopd) " --msgbox "\
Usage and examples: https://github.com/lightninglabs/loop#loop-out-swaps\n
Use the command 'loop' to see the options.
" 10 56
needsReboot=0
fi
/home/admin/config.scripts/bonus.loop.sh menu
needsReboot=1
else
l1="FAILED to install Lightning LOOP"
l2="Try manual install in the terminal with:"

View File

@ -160,7 +160,6 @@ This can take multiple hours.
/home/admin/config.scripts/blitz.lcd.sh hide
;;
STATUS)
echo "######## Electrum Rust Server Status Info ########"
sudo /home/admin/config.scripts/bonus.electrs.sh status
echo
echo "Press ENTER to get back to main menu."

View File

@ -3,7 +3,7 @@
# command info
if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
echo "config script to switch the Lightning Loop Service on or off"
echo "bonus.loop.sh [on|off]"
echo "bonus.loop.sh [on|off|menu]"
exit 1
fi
@ -14,6 +14,15 @@ if ! grep -Eq "^loop=" /mnt/hdd/raspiblitz.conf; then
echo "loop=off" >> /mnt/hdd/raspiblitz.conf
fi
# show info menu
if [ "$1" = "menu" ]; then
dialog --title " Info Loop Service " --msgbox "\n\
Usage and examples: https://github.com/lightninglabs/loop#loop-out-swaps\n
Use the command 'loop' on the terminal to see the options.
" 10 56
exit 0
fi
# stop services
echo "making sure the loop service is not running"
sudo systemctl stop loopd 2>/dev/null