From 119926e335a460f4c3520e36d05ec2ef107eb1a0 Mon Sep 17 00:00:00 2001 From: rootzoll Date: Fri, 21 Dec 2018 03:03:06 +0100 Subject: [PATCH] updated install for zapconnect --- build.sdcard/raspbianStretchDesktop.sh | 18 ++++++++++++++++++ home.admin/97addMobileWalletZap.sh | 17 +++++++++++------ 2 files changed, 29 insertions(+), 6 deletions(-) diff --git a/build.sdcard/raspbianStretchDesktop.sh b/build.sdcard/raspbianStretchDesktop.sh index a905426..de5dfb1 100644 --- a/build.sdcard/raspbianStretchDesktop.sh +++ b/build.sdcard/raspbianStretchDesktop.sh @@ -332,6 +332,24 @@ if [ ${#installed} -eq 0 ]; then exit 1 fi +# Go is needed for ZAP connect later +echo "*** Installing Go ***" +wget https://storage.googleapis.com/golang/go1.11.linux-armv6l.tar.gz +if [ ! -f "./go1.11.linux-armv6l.tar.gz" ] +then + echo "!!! FAIL !!! Download not success." + exit 1 +fi +sudo tar -C /usr/local -xzf go1.11.linux-armv6l.tar.gz +sudo rm *.gz +sudo mkdir /usr/local/gocode +sudo chmod 777 /usr/local/gocode +export GOROOT=/usr/local/go +export PATH=$PATH:$GOROOT/bin +export GOPATH=/usr/local/gocode +export PATH=$PATH:$GOPATH/bin +echo "" + ##### Build from Source ## To quickly catch up get latest patches if needed #repo="github.com/lightningnetwork/lnd" diff --git a/home.admin/97addMobileWalletZap.sh b/home.admin/97addMobileWalletZap.sh index 08c8893..1672feb 100755 --- a/home.admin/97addMobileWalletZap.sh +++ b/home.admin/97addMobileWalletZap.sh @@ -8,14 +8,19 @@ clear echo "*** Setup ***" echo "" echo "Installing zapconnect. Please wait..." +export GOROOT=/usr/local/go +export PATH=$PATH:$GOROOT/bin +export GOPATH=/usr/local/gocode +export PATH=$PATH:$GOPATH/bin echo "" -echo "Getting github.com/LN-Zap/zapconnect ..." +echo "Getting github.com/LN-Zap/zapconnect (please wait) ..." +cd $GOPATH/src/github.com/LN-Zap/zapconnect go get -d github.com/LN-Zap/zapconnect echo "" echo "Building github.com/LN-Zap/zapconnect ..." -cd /home/admin/go/src/github.com/LN-Zap/zapconnect/ -go build -o /home/admin/go/src/github.com/LN-Zap/zapconnect/zapconnect - +make +cd +sleep 3 clear echo "******************************" @@ -43,10 +48,10 @@ echo "*** STEP 2 : Click on Scan (make whole QR code fill camera) ***" if [ ${#dynDomain} -eq 0 ]; then # If you drop the -i parameter, zapconnect will use the external IP. - /home/admin/go/src/github.com/LN-Zap/zapconnect/zapconnect -i + zapconnect -i else # when dynamic domain is set - /home/admin/go/src/github.com/LN-Zap/zapconnect/zapconnect --host=${dynDomain} + zapconnect --host=${dynDomain} fi echo "(To shrink QR code: OSX->CMD- / LINUX-> CTRL-) Press ENTER when finished."