The idea is to run automatic IP updates to SmartDNSProxy via API from a Mac laptop connected via WiFi only when the laptop is at home. The way we check if laptop is at home is by checking and validating the name of the WiFi SSID. If the Laptop is connected outside of home, the IP change will not happen, but if it is at home, the IP change will be called via the command. The command would run every 15 minutes or so.
- Download the script, save it somewhere accessible and safe.
- Change the wifi network in TARGET_WIFI variable (currently uses 'foo')
- Edit line 16 (starts with curl) and paste your own URL from SmartDNSProxy API page in your control panel
- Save the script
- In terminal, run chmod +x update_dnsapi_public.sh to make it executable
- Check out if everything works ok. If you are at home wifi and your credentials are correct, both WiFi SSID name, API URL etc.
- Add the script with full path (run pwd or use Finder) to a scheduler - launchd or Launch Control (TBA) - CAN YOU HELP with this part of the documentation?
Enjoy!