add TOR to menu

This commit is contained in:
rootzoll
2018-08-21 12:30:43 +02:00
parent a2bff8cc6a
commit c0738d87bf
4 changed files with 27 additions and 3 deletions

View File

@@ -10,7 +10,7 @@
echo "" echo ""
echo "***************************************" echo "***************************************"
echo "* RASPIBLITZ SD CARD IMAGE SETUP v0.7 *" echo "* RASPIBLITZ SD CARD IMAGE SETUP v0.75*"
echo "***************************************" echo "***************************************"
echo "" echo ""

View File

@@ -204,7 +204,7 @@ ${color_yellow} ${color_gray}${ln_channels_online}/${ln_channels_t
${color_yellow}${ln_external} ${color_yellow}${ln_external}
${color_yellow} ${color_yellow}
" \ " \
"RaspiBlitz v0.7" \ "RaspiBlitz v0.75" \
"-------------------------------------------" \ "-------------------------------------------" \
"${load##up*, }" "${temp}" \ "${load##up*, }" "${temp}" \
"${hdd}" "${sync_percentage}" "${hdd}" "${sync_percentage}"

View File

@@ -84,6 +84,12 @@ else
if [ "${network}" = "bitcoin" ]; then if [ "${network}" = "bitcoin" ]; then
OPTIONS+=(SWITCH "Switch ${switchOption}") OPTIONS+=(SWITCH "Switch ${switchOption}")
fi fi
torInstalled=$(sudo ls /mnt/hdd/tor/lnd9735/hostname 2>/dev/null | grep 'hostname' -c)
if [ ${torInstalled} -eq 0 ]; then
OPTIONS+=(TOR "Make reachable thru TOR")
else
OPTIONS+=(NYX "Monitor TOR")
fi
# final Options # final Options
OPTIONS+=(X "Console / Terminal") OPTIONS+=(X "Console / Terminal")
@@ -131,6 +137,10 @@ case $CHOICE in
read key read key
./00mainMenu.sh ./00mainMenu.sh
;; ;;
NYX)
sudo nyx
./00mainMenu.sh
;;
lnchannels) lnchannels)
lnchannels lnchannels
echo "Press ENTER to return to main menu." echo "Press ENTER to return to main menu."
@@ -179,6 +189,12 @@ case $CHOICE in
read key read key
./00mainMenu.sh ./00mainMenu.sh
;; ;;
TOR)
sudo ./96addTorService.sh
echo "Press ENTER to return to main menu."
read key
./00mainMenu.sh
;;
X) X)
lncli -h lncli -h
echo "SUCH WOW come back with ./00mainMenu.sh" echo "SUCH WOW come back with ./00mainMenu.sh"

View File

@@ -11,6 +11,7 @@ network=`cat .network`
# location of TOR config # location of TOR config
torrc="/etc/tor/torrc" torrc="/etc/tor/torrc"
# check if TOR was already installed and is funtional
clear clear
echo "" echo ""
echo "*** Check if TOR service is functional ***" echo "*** Check if TOR service is functional ***"
@@ -25,6 +26,13 @@ else
echo "" echo ""
fi fi
# ask user if to proceed
dialog --title " WARNING " --yesno "At the moment you just can switch TOR on - YOU CANNOT SWITCH BACK. Do you want to proceed?" 8 57
response=$?
case $response in
1) exit 1;
esac
echo "*** Adding Tor Sources to sources.list ***" echo "*** Adding Tor Sources to sources.list ***"
echo "deb http://deb.torproject.org/torproject.org stretch main" | sudo tee -a /etc/apt/sources.list echo "deb http://deb.torproject.org/torproject.org stretch main" | sudo tee -a /etc/apt/sources.list
echo "deb-src http://deb.torproject.org/torproject.org stretch main" | sudo tee -a /etc/apt/sources.list echo "deb-src http://deb.torproject.org/torproject.org stretch main" | sudo tee -a /etc/apt/sources.list