btauth --user USER_OR_EMAIL --pass PASSWORD # To Authenticate with the BT WiFi
btmaintain --user USER_OR_EMAIL --pass PASSWORD # To maintain a connection and re-authenticate automatically
nohup btmaintain --user USER_OR_EMAIL --pass PASSWORD 2>&1 >/dev/null & # Same as above but ran in background
This will check whether you lost connectivity by pinging
google.com
every 1
second. If you are not it will check whether
the SSL certificate of google.com had been replaced with a BT WiFi
certificate and re-authenticate you via btauth
.
Download or copy both scripts to /usr/local/bin
and give them execute permissions:
mkdir -p /usr/local/bin
curl -sSL https://goo.gl/2gto0U > /usr/local/bin/btauth
chmod +x /usr/local/bin/btauth
curl -sSL https://goo.gl/07sNF1 > /usr/local/bin/btmaintain
chmod +x /usr/local/bin/btmaintain
BTAuth Copyright (C) 2015 Itay Grudev
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
See http://www.gnu.org/licenses/ for the full text of the GNU General Public License.
I'm sorry to say that I could not get this to work. I have been trying to use the 'BT Wifi' selection. I added the "&provider=btoz" to the beginning and to the end of the curl data string but I just could not get it to work. There was another script by https://gist.github.com/sscarduzio/05ed0b41d6234530d724 which I have also tried to use with the '&provider=btoz' but to no avail. I am still a bit of a beginner with scripting and linux. I have tried my best to troubleshoot it but I just seem to be getting nowhere. Is there anyway to get any error messages or log to examine what is going wrong with the curl string?