Last active
August 29, 2015 14:04
-
-
Save mostlygeek/2b5bc9fb311b68eaba0e to your computer and use it in GitHub Desktop.
dhcp-event script for
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# == ABOUT == | |
# this script is run when the WAN IP address changes from the | |
# asuswrt (https://github.com/RMerl/asuswrt-merlin) project | |
# It updates the ddns name from freedns.afraid.org | |
# the base64 key part from the update url you get from freedns.afraid.org | |
# don't forget to copy/paste the "=" if it exists at the end. | |
KEY=<YOUR KEY HERE> | |
# use openssl instead of `wget` since we need https connections | |
# support https connections... and the `sleep 5` prevents | |
# openssl from closing the connection due to eof on stdin from | |
# just using `echo` | |
(echo "GET /dynamic/update.php?$KEY"; sleep 5) | openssl s_client -connect freedns.afraid.org:443 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment