mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-10-05 14:03:17 +02:00
LND connect in REST and RPC mode
This commit is contained in:
@@ -111,7 +111,7 @@ case $CHOICE in
|
|||||||
rm -f qr.txt
|
rm -f qr.txt
|
||||||
/home/admin/XXdisplayQRlcd_hide.sh
|
/home/admin/XXdisplayQRlcd_hide.sh
|
||||||
|
|
||||||
./97addMobileWalletLNDconnect.sh 10009
|
./97addMobileWalletLNDconnect.sh RPC
|
||||||
exit 1;
|
exit 1;
|
||||||
;;
|
;;
|
||||||
ZEUS_IOS)
|
ZEUS_IOS)
|
||||||
@@ -130,7 +130,7 @@ case $CHOICE in
|
|||||||
rm -f qr.txt
|
rm -f qr.txt
|
||||||
/home/admin/XXdisplayQRlcd_hide.sh
|
/home/admin/XXdisplayQRlcd_hide.sh
|
||||||
|
|
||||||
./97addMobileWalletLNDconnect.sh 8080
|
./97addMobileWalletLNDconnect.sh REST
|
||||||
exit 1;
|
exit 1;
|
||||||
;;
|
;;
|
||||||
ZEUS_ANDROID)
|
ZEUS_ANDROID)
|
||||||
@@ -147,7 +147,7 @@ case $CHOICE in
|
|||||||
rm -f qr.txt
|
rm -f qr.txt
|
||||||
/home/admin/XXdisplayQRlcd_hide.sh
|
/home/admin/XXdisplayQRlcd_hide.sh
|
||||||
|
|
||||||
./97addMobileWalletLNDconnect.sh 8080
|
./97addMobileWalletLNDconnect.sh REST
|
||||||
exit 1;
|
exit 1;
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@@ -3,7 +3,14 @@
|
|||||||
# get service port from argument
|
# get service port from argument
|
||||||
servicePort="10009"
|
servicePort="10009"
|
||||||
if [ $# -gt 0 ]; then
|
if [ $# -gt 0 ]; then
|
||||||
servicePort="$1"
|
if [ "$1" == "RPC" ]; then
|
||||||
|
echo "running RPC mode"
|
||||||
|
servicePort="10009"
|
||||||
|
fi
|
||||||
|
if [ "$1" == "REST" ]; then
|
||||||
|
echo "running REST mode"
|
||||||
|
servicePort="8080"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# load raspiblitz config data
|
# load raspiblitz config data
|
||||||
@@ -79,7 +86,11 @@ if [ ${#sshtunnel} -gt 0 ]; then
|
|||||||
if [ ${isForwarded} -gt 0 ]; then
|
if [ ${isForwarded} -gt 0 ]; then
|
||||||
local=0
|
local=0
|
||||||
host=$(echo $sshtunnel | cut -d '@' -f2 | cut -d ' ' -f1)
|
host=$(echo $sshtunnel | cut -d '@' -f2 | cut -d ' ' -f1)
|
||||||
port=$(echo $sshtunnel | awk "{split($0,a,\"${servicePort}<\"); print a[2]}" | cut -d ' ' -f1 | sed 's/[^0-9]//g')
|
if [ "${servicePort}" == "1009" ]; then
|
||||||
|
port=$(echo $sshtunnel | awk '{split($0,a,"10009<"); print a[2]}' | cut -d ' ' -f1 | sed 's/[^0-9]//g')
|
||||||
|
elif [ "${servicePort}" == "8080" ]; then
|
||||||
|
port=$(echo $sshtunnel | awk '{split($0,a,"8080<"); print a[2]}' | cut -d ' ' -f1 | sed 's/[^0-9]//g')
|
||||||
|
fi
|
||||||
echo "port ${servicePort} forwarding from port ${port} from server ${host}"
|
echo "port ${servicePort} forwarding from port ${port} from server ${host}"
|
||||||
else
|
else
|
||||||
echo "port ${servicePort} is not part of the ssh forwarding - keep default port ${servicePort}"
|
echo "port ${servicePort} is not part of the ssh forwarding - keep default port ${servicePort}"
|
||||||
|
Reference in New Issue
Block a user