From ac00613bda57b76888d6018f6fd78ec42d273d01 Mon Sep 17 00:00:00 2001 From: nyxnor <69700936+nyxnor@users.noreply.github.com> Date: Thu, 8 Apr 2021 01:04:03 +0000 Subject: [PATCH 1/6] print debug logs Blitz help menu https://github.com/rootzoll/raspiblitz/issues/2012 print debug logs fully and link option. Raspiblitz help menu --- home.admin/_commands.sh | 76 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 68 insertions(+), 8 deletions(-) diff --git a/home.admin/_commands.sh b/home.admin/_commands.sh index 546926dea..4dd49a0d6 100755 --- a/home.admin/_commands.sh +++ b/home.admin/_commands.sh @@ -2,16 +2,71 @@ # SHORTCUT COMMANDS you can call as user 'admin' from terminal -# command: raspiblitz -# calls the the raspiblitz mainmenu (legacy) -function raspiblitz() { +# command: blitz +# calls the the raspiblitz mainmenu (shortcut) +function blitz() { +if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ] || [ "$1" = "--help" ] || [ "$1" = "help" ] ; then + echo "_commands.sh" + echo "Usage: command [options]" + echo "" + echo "Blitz commands are consolidated here." + echo "" + echo "Menu access:" + echo " raspiblitz menu" + echo " menu menu" + echo " bash menu" + echo " repair menu > repair" + echo "" + echo "Checks:" + echo " status informational Blitz status screen" + echo " sourcemode copy blockchain source modus" + echo " check check if Blitz configuration files are correct" + echo " debug print debug logs" + echo " debug -l print debug logs with bin link" + echo " patch sync scripts with latest set github and branch" + echo " github jumping directly into the options to change branch/repo/pr" + echo "" + echo "Power:" + echo " restart restart the node" + echo " off shutdown the node" + echo "" + echo "Display:" + echo " hdmi switch video output to HDMI" + echo " lcd switch video output to LCD" + echo " headless switch video output to HEADLESS" + echo "" + echo "BTC tx:" + echo " torthistx broadcast transaction through Tor to Blockstreams API and into the network" + echo " gettx retrieve transaction from mempool or blockchain and print as JSON" + echo " watchtx retrieve transaction from mempool or blockchain until certain confirmation target" + echo "" + echo "LND:" + echo " balance your satoshi balance" + echo " channels your lightning channels" + echo " fwdreport show forwarding report" + echo " manage command line tool for advanced channel management of an LND" + echo "" + echo "Users:" + echo " bos Balance of Satoshis" + echo " lit Lightning Terminal" + echo " pyblock PyBlock" + echo " chantools ChanTools" + echo " jm JoinMarket" + echo " faraday Faraday" + echo " loop Loop" + echo " pool Pool" + echo "" + echo " Extras:" + echo " whitepaper download the whitepaper from the blockchain to /home/admin/bitcoin.pdf" + echo " notifyme wrapper for blitz.notify.sh that will send a notification using the configured method and settings" + else cd /home/admin ./00raspiblitz.sh } -# command: blitz -# calls the the raspiblitz mainmenu (shortcut) -function blitz() { +# command: raspiblitz +# calls the the raspiblitz mainmenu (legacy) +function raspiblitz() { cd /home/admin ./00raspiblitz.sh } @@ -44,7 +99,12 @@ function check() { # command: debug function debug() { cd /home/admin - ./XXdebugLogs.sh + echo "Printing debug logs. Be patient, this should take maximum 2 minutes ..." + if [[ $1 = "-l" ]]; then + ./XXdebugLogs.sh > /var/cache/raspiblitz/debug.log && cat /var/cache/raspiblitz/debug.log | nc termbin.com 9999 + else + ./XXdebugLogs.sh > /var/cache/raspiblitz/debug.log && cat /var/cache/raspiblitz/debug.log + fi } # command: patch @@ -339,4 +399,4 @@ function notifyme() { function whitepaper() { cd /home/admin/config.scripts ./bonus.whitepaper.sh on -} \ No newline at end of file +} From f51547799f0c1f46a32de65054008e4a90ee421d Mon Sep 17 00:00:00 2001 From: nyxnor <69700936+nyxnor@users.noreply.github.com> Date: Thu, 8 Apr 2021 21:58:26 +0000 Subject: [PATCH 2/6] removed loop, pool and faraday --- home.admin/_commands.sh | 48 ----------------------------------------- 1 file changed, 48 deletions(-) diff --git a/home.admin/_commands.sh b/home.admin/_commands.sh index 4dd49a0d6..f2ed6f4b1 100755 --- a/home.admin/_commands.sh +++ b/home.admin/_commands.sh @@ -52,9 +52,6 @@ if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ] || [ "$1" = "--help" ] echo " pyblock PyBlock" echo " chantools ChanTools" echo " jm JoinMarket" - echo " faraday Faraday" - echo " loop Loop" - echo " pool Pool" echo "" echo " Extras:" echo " whitepaper download the whitepaper from the blockchain to /home/admin/bitcoin.pdf" @@ -261,21 +258,6 @@ function jm() { fi } -# command: faraday -# switch to the faraday user for the Faraday Service -function faraday() { - if [ $(grep -c "faraday=on" < /mnt/hdd/raspiblitz.conf) -eq 1 ]; then - echo "# switching to the faraday user with the command: 'sudo su - faraday'" - echo "# use command 'exit' and then 'raspiblitz' to return to menu" - echo "# use command 'frcli --help' now to get more info" - sudo su - faraday - echo "# use command 'raspiblitz' to return to menu" - else - echo "Faraday is not installed - to install run:" - echo "/home/admin/config.scripts/bonus.faraday.sh on" - fi -} - # command: lit # switch to the lit user for the loop, pool & faraday services function lit() { @@ -291,36 +273,6 @@ function lit() { fi } -# command: loop -# switch to the loop user for the Lightning Loop Service -function loop() { - if [ $(grep -c "loop=on" < /mnt/hdd/raspiblitz.conf) -eq 1 ]; then - echo "# switching to the loop user with the command: 'sudo su - loop'" - echo "# use command 'exit' and then 'raspiblitz' to return to menu" - echo "# use command 'loop --help' now to get more info" - sudo su - loop - echo "# use command 'raspiblitz' to return to menu" - else - echo "Lightning Loop is not installed - to install run:" - echo "/home/admin/config.scripts/bonus.loop.sh on" - fi -} - -# command: pool -# switch to the pool user for the Pool Service -function pool() { - if [ $(grep -c "pool=on" < /mnt/hdd/raspiblitz.conf) -gt 0 ]; then - echo "# switching to the pool user with the command: 'sudo su - pool'" - echo "# use command 'exit' and then 'raspiblitz' to return to menu" - echo "# use command 'pool --help' now to get more info" - sudo su - pool - echo "# use command 'raspiblitz' to return to menu" - else - echo "Pool is not installed - to install run:" - echo "/home/admin/config.scripts/bonus.pool.sh on" - fi -} - # aliases for lit # switch to the pool user for the Pool Service if [ -f "/mnt/hdd/raspiblitz.conf" ] && [ $(grep -c "lit=on" < /mnt/hdd/raspiblitz.conf) -gt 0 ]; then From 043a3bb638d881b42dbcc78278f8dfbb5dc7c560 Mon Sep 17 00:00:00 2001 From: nyxnor <69700936+nyxnor@users.noreply.github.com> Date: Fri, 9 Apr 2021 08:04:53 +0000 Subject: [PATCH 3/6] removed lndmanage --- home.admin/_commands.sh | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/home.admin/_commands.sh b/home.admin/_commands.sh index f2ed6f4b1..e93269c4b 100755 --- a/home.admin/_commands.sh +++ b/home.admin/_commands.sh @@ -44,14 +44,13 @@ if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ] || [ "$1" = "--help" ] echo " balance your satoshi balance" echo " channels your lightning channels" echo " fwdreport show forwarding report" - echo " manage command line tool for advanced channel management of an LND" echo "" echo "Users:" echo " bos Balance of Satoshis" - echo " lit Lightning Terminal" - echo " pyblock PyBlock" echo " chantools ChanTools" + echo " lit Lightning Terminal" echo " jm JoinMarket" + echo " pyblock PyBlock" echo "" echo " Extras:" echo " whitepaper download the whitepaper from the blockchain to /home/admin/bitcoin.pdf" @@ -148,20 +147,6 @@ function headless() { sudo /home/admin/config.scripts/blitz.display.sh set-display headless } -# command: manage -function manage() { - if [ $(cat /mnt/hdd/raspiblitz.conf 2>/dev/null | grep -c "lndmanage=on") -eq 1 ]; then - cd /home/admin/lndmanage - source venv/bin/activate - echo "NOTICE: Needs at least one active channel to run without error." - echo "to exit (venv) enter ---> deactivate" - lndmanage - else - echo "lndmanage not installed - to install run:" - echo "sudo /home/admin/config.scripts/bonus.lndmanage.sh on" - fi -} - # command: torthistx function torthistx() { if [ $(cat /mnt/hdd/raspiblitz.conf 2>/dev/null | grep -c "runBehindTor=on") -eq 1 ]; then From 97ca130112af2a8a2db1bb356440b03c1981eb2e Mon Sep 17 00:00:00 2001 From: nyxnor <69700936+nyxnor@users.noreply.github.com> Date: Tue, 13 Apr 2021 01:16:24 +0000 Subject: [PATCH 4/6] add information of help when going to the terminal --- home.admin/00mainMenu.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/home.admin/00mainMenu.sh b/home.admin/00mainMenu.sh index 248f74c7a..e1337c8dc 100755 --- a/home.admin/00mainMenu.sh +++ b/home.admin/00mainMenu.sh @@ -360,7 +360,8 @@ case $CHOICE in echo "* RaspiBlitz Commandline" echo "* Here be dragons .. have fun :)" echo "***********************************" - echo "Bitcoin command line options: bitcoin-cli help" + echo "Blitz command line options: blitz help" + echo "Bitcoin command line options: bitcoin-cli help" echo "LND command line options: lncli -h" echo "Back to main menu use command: raspiblitz" echo From dbbbaa60c886593fbe1d1347ec879a51d2cda974 Mon Sep 17 00:00:00 2001 From: nyxnor <69700936+nyxnor@users.noreply.github.com> Date: Tue, 13 Apr 2021 17:23:32 +0000 Subject: [PATCH 5/6] Update _commands.sh --- home.admin/_commands.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home.admin/_commands.sh b/home.admin/_commands.sh index 02af84aab..bb0408b2d 100755 --- a/home.admin/_commands.sh +++ b/home.admin/_commands.sh @@ -103,7 +103,7 @@ function debug() { cd /home/admin echo "Printing debug logs. Be patient, this should take maximum 2 minutes ..." if [[ $1 = "-l" ]]; then - ./XXdebugLogs.sh > /var/cache/raspiblitz/debug.log && cat /var/cache/raspiblitz/debug.log | nc termbin.com 9999 + ./XXdebugLogs.sh > /var/cache/raspiblitz/debug.log && cat /var/cache/raspiblitz/debug.log | torsocks nc termbin.com 9999 else ./XXdebugLogs.sh > /var/cache/raspiblitz/debug.log && cat /var/cache/raspiblitz/debug.log fi From 09aa43e843bb50a6954e87d68795aa2cbe3ceac2 Mon Sep 17 00:00:00 2001 From: nyxnor <69700936+nyxnor@users.noreply.github.com> Date: Tue, 13 Apr 2021 17:24:28 +0000 Subject: [PATCH 6/6] torsocks netcat for anonymity --- home.admin/XXdebugLogs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home.admin/XXdebugLogs.sh b/home.admin/XXdebugLogs.sh index 3762ec9fc..283aae5d2 100755 --- a/home.admin/XXdebugLogs.sh +++ b/home.admin/XXdebugLogs.sh @@ -216,5 +216,5 @@ echo "" echo "*** OPTION: SHARE THIS DEBUG OUTPUT ***" echo "An easy way to share this debug output on GitHub or on a support chat" echo "use the following command and share the resulting link:" -echo "/home/admin/XXdebugLogs.sh | nc termbin.com 9999" +echo "/home/admin/XXdebugLogs.sh | torsocks nc termbin.com 9999" echo ""