Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
power outage issue with solution(band aid) #167
there was already i post on google groups about this and his solution was reinstalling the server. I don't want to reinstall the server since we have a lot of power outage here. So what happen is that when there is a power outage and when the power comes back, the server doesn't work properly. The server runs and you can log in as the admin and status looks good but on the client side, the portal does not show up even after a server reboot. I did find a workaround on this problem. When the server is running, I log in as the admin and I click on the "network settings" tab. Check or uncheck the Bugos NXDOMAIN(OpenDNS) checkbox and finally save settings. After 5 mins, client should be able to login. It doesn't really matter if its checked or unchecked. I think what it does is just refresh the network settings.
We have several power outage in a month here that goes on for an hour and this method works everytime. I hope this'll help anybody out there with power outage issue and I also hope this'll get fix. I don't really want to do this everytime there is power outage. I'm using a raspberry pi so i just want to leave it running and not worry about breaking the server. Thanks!
Just a little more information.
In fact what you are doing (by means of a grase 5minute cronjob) is restart dnsmasq and chilli, by (in the background) running:
so if you have ssh access you can run it manually not having to wait for 5 minutes.
If nothing is changed Chilli/DnsMasq are not restarted, hence you need to change the "Bogus NXDOMAIN" setting, to trigger the restart, as seen in this file: https://github.com/GraseHotspot/grase-conf-dnsmasq/blob/master/update_grase_networksettings.sh
Anyway fiddling a little with bash (im no expert far from it actually), i came up with a script that you can run to check if the uam page is available and if not automatically restart chilli/dnsmasq, maybe you can try to make a bash file (checkuam.sh) for instance with:
which you can run like this
ONLINE UAM PAGE: http://prntscr.com/enfy7u (i used the right uam IP to get a sucessfull test)
OFFLINE UAM PAGE: http://prntscr.com/enfykl (i used the wrong uam IP to get a failed test, restarting chilli/dnsmasq)
And then if it solves your "problem" make it a cronjob every x minutes.
Don't forget to add the full path to the checkuam.sh file on the cronjob