additional script refactor

This commit is contained in:
rootzoll 2018-07-27 11:17:59 +02:00
parent c67f4bee90
commit 7d23510320
3 changed files with 25 additions and 10 deletions

View file

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
## default menu settings ## default menu settings
HEIGHT=9 HEIGHT=11
WIDTH=64 WIDTH=64
CHOICE_HEIGHT=4 CHOICE_HEIGHT=4
BACKTITLE="RaspiBlitz" BACKTITLE="RaspiBlitz"
@ -14,7 +14,6 @@ setupState=0;
if [ -f "/home/admin/.setup" ]; then if [ -f "/home/admin/.setup" ]; then
setupState=$( cat /home/admin/.setup ) setupState=$( cat /home/admin/.setup )
fi fi
if [ ${setupState} -eq 0 ]; then if [ ${setupState} -eq 0 ]; then
# start setup # start setup
@ -55,8 +54,9 @@ else
else else
# REGULAR MENU # REGULAR MENU
OPTIONS+=(INFO "Show RaspiBlitz Status Screen" \ OPTIONS+=(INFO "RaspiBlitz Status Screen" \
ADD "Add lnbalance and lnchannels command") lnbalance "Detailed Wallet Balances" \
lnchannels "Lightning Channel List")
fi fi
@ -83,10 +83,19 @@ case $CHOICE in
./00infoBlitz.sh ./00infoBlitz.sh
echo "Screen is not updating ... press ENTER to continue." echo "Screen is not updating ... press ENTER to continue."
read key read key
./00mainMenu.sh; ./00mainMenu.sh
;; ;;
ADD) # add scripts lnbalance)
./67addAdditionalScripts.sh lnbalance
echo "Press ENTER to return to main menu."
read key
./00mainMenu.sh
;;
lnchannels)
lnchannels
echo "Press ENTER to return to main menu."
read key
./00mainMenu.sh
;; ;;
X) # unlock X) # unlock
./AAunlockLND.sh ./AAunlockLND.sh

View file

@ -1,6 +1,9 @@
#!/bin/sh #!/bin/sh
echo "" echo ""
# add bonus scripts
./91addBonus.sh
###### SWAP ###### SWAP
echo "*** SWAP file ***" echo "*** SWAP file ***"
swapExists=$(swapon -s | grep -c /mnt/hdd/swapfile) swapExists=$(swapon -s | grep -c /mnt/hdd/swapfile)

View file

@ -1,3 +1,6 @@
# https://github.com/Stadicus/guides/blob/master/raspibolt/raspibolt_67_additional-scripts.md
echo "*** Adding: raspibolt_67_additional-scripts.md"
echo "Creating the command lnbalance as well as lnchannels which will give you a nicer output" echo "Creating the command lnbalance as well as lnchannels which will give you a nicer output"
cd cd
mkdir /home/admin/tmpScriptDL mkdir /home/admin/tmpScriptDL