Skip to content

Instantly share code, notes, and snippets.

@Reiikz
Reiikz / check
Last active December 10, 2023 21:48 — forked from a-c-t-i-n-i-u-m/freenom.com.ddns.sh
Dynamic DNS support shell script for freenom.com
#!/bin/bash
GET_IP_URL="https://api.ipify.org/"
UPDATE_SCRIPT=$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )/update
LOGGER_SCRIPT=$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )/log
source $( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )/config
HOST_RESULT="$(host $freenom_domain_name 80.80.80.80)"
DNS_IP=$(echo $HOST_RESULT | cut -d' ' -f 12)
CURR_IP="$(curl -s $GET_IP_URL)"