raspiblitz/home.admin/97addMobileWallet.sh

154 lines
4.6 KiB
Bash
Raw Normal View History

2018-08-31 20:52:29 +02:00
#!/bin/bash
2018-12-21 01:22:30 +01:00
# get raspiblitz config
2019-02-02 23:49:04 +01:00
source /home/admin/raspiblitz.info
2018-12-21 01:22:30 +01:00
source /mnt/hdd/raspiblitz.conf
2019-04-03 13:07:25 +01:00
justLocal=1
# if dynDomain is set connect from outside is possible (no notice)
if [ ${#dynDomain} -gt 0 ]; then
justLocal=0
fi
# if sshtunnel to 10009/8080 then outside reach is possible (no notice)
isForwarded=$(echo ${sshtunnel} | grep -c "10009<")
if [ ${isForwarded} -gt 0 ]; then
justLocal=0
fi
isForwarded=$(echo ${sshtunnel} | grep -c "8080<")
if [ ${isForwarded} -gt 0 ]; then
justLocal=0
fi
2018-12-21 01:22:30 +01:00
# check if dynamic domain is set
2019-04-03 13:07:25 +01:00
if [ ${justLocal} -eq 1 ]; then
whiptail --title " Just Local Network? " --yesno "If you want to connect with your RaspiBlitz
2018-12-21 01:22:30 +01:00
also from outside your local network you need to
2019-04-03 13:07:25 +01:00
activate 'Services' -> 'DynamicDNS' FIRST.
Or use SSH tunnel forwarding for port 10009.
2018-12-21 01:22:30 +01:00
For more details see chapter in GitHub README
2019-04-03 13:07:25 +01:00
on the service 'DynamicDNS'
2018-12-21 01:22:30 +01:00
https://github.com/rootzoll/raspiblitz
2018-12-21 01:32:43 +01:00
Do you JUST want to connect with your mobile
2018-12-21 01:22:30 +01:00
when your are on the same LOCAL NETWORK?
2019-04-03 13:07:25 +01:00
" 15 54
2018-12-21 01:22:30 +01:00
response=$?
case $response in
1) exit ;;
esac
fi
2018-08-31 20:52:29 +02:00
# Basic Options
OPTIONS=(ZAP "Zap Wallet (iOS)" \
2019-04-04 03:25:13 +01:00
SHANGO_IOS "Shango Wallet (iOS)" \
SHANGO_ANDROID "Shango Wallet (Android)" \
ZEUS_IOS "Zeus Wallet (iOS)" \
ZEUS_ANDROID "Zeus Wallet (Android)"
)
2018-08-31 20:52:29 +02:00
CHOICE=$(whiptail --clear --title "Choose Mobile Wallet" --menu "" 15 50 6 "${OPTIONS[@]}" 2>&1 >/dev/tty)
./XXdisplayQRlcd_hide.sh
2018-08-31 20:52:29 +02:00
clear
case $CHOICE in
2019-04-04 02:44:42 +01:00
CLOSE)
exit 1;
;;
SHANGO_IOS)
2019-04-04 02:44:42 +01:00
echo "https://testflight.apple.com/join/WwCjFnS8" > qr.txt
./XXdisplayLCD.sh /home/admin/assets/install_shango.jpg
2019-04-04 02:44:42 +01:00
whiptail --title "Install Testflight and Shango on your iOS device" \
--yes-button "continue" \
--no-button "link as QR code" \
2019-04-04 04:40:06 +01:00
--yesno "At the moment this app is in public beta testing:\n\nhttps://testflight.apple.com/join/WwCjFnS8\n\nJoin testing and follow ALL instructions.\n\nWhen installed and started -> continue" 10 60
2019-04-04 02:44:42 +01:00
if [ $? -eq 1 ]; then
/home/admin/XXdisplayQR.sh
fi
shred qr.txt
rm -f qr.txt
/home/admin/XXdisplayQRlcd_hide.sh
./97addMobileWalletShango.sh
exit 1;
;;
SHANGO_ANDROID)
2019-04-04 02:44:42 +01:00
echo "market://details?id=com.shango" > qr.txt
./XXdisplayQRlcd.sh
whiptail --title "Install Shango on your Android Phone" \
--yes-button "continue" \
--no-button "link as QR code" \
2019-04-04 04:40:06 +01:00
--yesno "At the moment this app is in public beta testing:\n\nhttps://play.google.com/apps/testing/com.shango\n\nEasiest way to install scan QR code on LCD with phone.\n\nWhen installed and started -> continue" 10 60
2019-04-04 02:44:42 +01:00
if [ $? -eq 1 ]; then
/home/admin/XXdisplayQR.sh
fi
shred qr.txt
rm -f qr.txt
/home/admin/XXdisplayQRlcd_hide.sh
./97addMobileWalletShango.sh
exit 1;
;;
ZAP)
2019-04-04 03:25:13 +01:00
echo "https://testflight.apple.com/join/P32C380R" > qr.txt
./XXdisplayQRlcd.sh
whiptail --title "Install Testflight and Zap on your iOS device" \
--yes-button "continue" \
--no-button "link as QR code" \
2019-04-04 04:40:06 +01:00
--yesno "At the moment this app is in public beta testing:\n\nhttps://testflight.apple.com/join/P32C380R\n\nJoin testing and follow ALL instructions.\n\nWhen installed and started -> continue" 10 60
2019-04-04 03:25:13 +01:00
if [ $? -eq 1 ]; then
/home/admin/XXdisplayQR.sh
fi
shred qr.txt
rm -f qr.txt
/home/admin/XXdisplayQRlcd_hide.sh
2019-04-04 03:32:44 +01:00
./97addMobileWalletLNDconnect.sh RPC
2019-04-04 02:44:42 +01:00
exit 1;
;;
2019-04-04 03:25:13 +01:00
ZEUS_IOS)
echo "https://testflight.apple.com/join/gpVFzEHN" > qr.txt
./XXdisplayQRlcd.sh
whiptail --title "Install Testflight and Zeus on your iOS device" \
--yes-button "continue" \
--no-button "link as QR code" \
2019-04-04 04:40:06 +01:00
--yesno "At the moment this app is in public beta testing:\n\nhttps://testflight.apple.com/join/gpVFzEHN\n\nJoin testing and follow ALL instructions.\n\nWhen installed and started -> continue" 10 60
2019-04-04 03:25:13 +01:00
if [ $? -eq 1 ]; then
/home/admin/XXdisplayQR.sh
fi
shred qr.txt
rm -f qr.txt
/home/admin/XXdisplayQRlcd_hide.sh
2019-04-04 03:32:44 +01:00
./97addMobileWalletLNDconnect.sh REST
2019-04-04 03:25:13 +01:00
exit 1;
;;
ZEUS_ANDROID)
echo "market://details?id=com.zeusln.zeus" > qr.txt
./XXdisplayQRlcd.sh
whiptail --title "Install Shango on your Android Phone" \
--yes-button "continue" \
--no-button "link as QR code" \
2019-04-04 04:40:06 +01:00
--yesno "Find the Zeus Wallet on the Android Play Store:\n\nhttps://play.google.com/store/apps/details?id=com.zeusln.zeus\n\nEasiest way to install scan QR code on LCD with phone.\n\nWhen installed and started -> continue." 10 60
2019-04-04 03:25:13 +01:00
if [ $? -eq 1 ]; then
/home/admin/XXdisplayQR.sh
fi
shred qr.txt
rm -f qr.txt
/home/admin/XXdisplayQRlcd_hide.sh
2019-04-04 03:32:44 +01:00
./97addMobileWalletLNDconnect.sh REST
2019-04-04 02:44:42 +01:00
exit 1;
;;
esac