1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

Encourage use of /usr/bin/iiab-support instead of ./install-support

This commit is contained in:
A Holt 2019-05-11 23:58:13 -04:00 committed by GitHub
parent 3dad45fd5a
commit a2125b7843
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,5 +1,13 @@
#!/bin/bash
echo -e "\n\n\e[41m DEPRECATED PLEASE RUN 'iiab-support' INSTEAD \e[0m\n\n"
read -p "Continue? [y/N] " ans
if [ "$ans" != "y" ]; then
echo
exit
fi
PLAYBOOK="iiab-support.yml"
INVENTORY="ansible_hosts"
CWD=`pwd`
@ -12,43 +20,7 @@ if [ ! -f $PLAYBOOK ]; then
exit 1
fi
echo -en "\n\nWhat OpenVPN machine name (openvpn_handle) do you want? "
read ans < /dev/tty
if [ "$ans" != "" ]; then
sed -i -e "s/^openvpn_handle:.*/openvpn_handle: $ans/" /etc/iiab/local_vars.yml
echo -e "\nYour machine's openvpn_handle is now set, in /etc/iiab/local_vars.yml\n"
else
echo -e "\nWARNING: openvpn_handle remains unchanged in /etc/iiab/local_vars.yml\n"
fi
sed -i -e "s/^openvpn_install:.*/openvpn_install: True/" /etc/iiab/local_vars.yml
sed -i -e "s/^openvpn_enabled:.*/openvpn_enabled: True/" /etc/iiab/local_vars.yml
echo -e "Now let's (re)install and (re)start OpenVPN...\n"
ansible-playbook -i $INVENTORY $PLAYBOOK --connection=local
echo -en "\nYour OpenVPN machine name (openvpn_handle) is: "
cat /etc/iiab/openvpn_handle
vpnip=$(ip a | grep tun0$ | awk '{print $2}')
if [ "$vpnip" != "" ]; then
echo -e "\nYour OpenVPN IP address (which can change) is: $vpnip\n\n"
else
echo -e "\nWARNING: OpenVPN IP ADDRESS NOT FOUND!\n\n"
fi
echo -e "OpenVPN TIPS:\n"
echo -e " 1. Check your Internet connection: run 'ping 8.8.8.8' and 'ping mit.edu'"
echo -e " 2. Run 'ip a' and look for a 'tun0' IP address like 10.8.0.x"
echo -e " 3. Check your OpenVPN connection: run 'ping 10.8.0.1'"
echo -e " 4. Sometimes waiting a minute helps -- then retry steps 2 and 3"
echo -e " 5. If necessary, run 'systemctl restart openvpn@xscenet'"
echo -e " 6. Read 'How can I remotely manage my Internet-in-a-Box?' at"
echo -e " http://FAQ.IIAB.IO to learn about alternatives like ngrok,"
echo -e " serveo, remot3.it and TeamViewer\n\n"