raspiblitz/home.admin/97addMobileWallet.sh

63 lines
1.5 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
2018-12-21 01:22:30 +01:00
dialog --title " Just Local Network? " --yesno "If you want to connect with your RaspiBlitz
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)" \
2018-09-04 21:40:50 +02:00
SHANGO "Shango Wallet (iOS/Android)")
2018-08-31 20:52:29 +02:00
2018-08-31 22:02:32 +02:00
CHOICE=$(dialog --clear --title "Choose Mobile Wallet" --menu "" 10 40 6 "${OPTIONS[@]}" 2>&1 >/dev/tty)
2018-08-31 20:52:29 +02:00
clear
case $CHOICE in
CLOSE)
exit 1;
;;
SHANGO)
./97addMobileWalletShango.sh
exit 1;
;;
ZAP)
./97addMobileWalletZap.sh
exit 1;
;;
esac