From c3abe5d2be93041cdc2aae010195d582e7da6141 Mon Sep 17 00:00:00 2001 From: jonathan Date: Wed, 4 Dec 2019 13:44:18 +0000 Subject: [PATCH] Added settings file --- lp-ddns/etc/lp-dyndns/settings.conf | 4 ++++ lp-ddns/usr/local/bin/lp-ddns | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 lp-ddns/etc/lp-dyndns/settings.conf diff --git a/lp-ddns/etc/lp-dyndns/settings.conf b/lp-ddns/etc/lp-dyndns/settings.conf new file mode 100644 index 0000000..d24dedc --- /dev/null +++ b/lp-ddns/etc/lp-dyndns/settings.conf @@ -0,0 +1,4 @@ +RECORDID="28378" +PASSWORD="pass123" +DOMAIN="test.jonathanselea.se" + diff --git a/lp-ddns/usr/local/bin/lp-ddns b/lp-ddns/usr/local/bin/lp-ddns index 494fde7..69a9b09 100755 --- a/lp-ddns/usr/local/bin/lp-ddns +++ b/lp-ddns/usr/local/bin/lp-ddns @@ -9,7 +9,8 @@ set -e # DO NOT MODIFY # -IP="$(curl -s ipv4.is)" +IP="$(curl --connect-timeout 10 -s ipv4.is || curl --connect-timeout 10 -s ifconfig.me)" +#IP="$(curl --config /etc/lp-dyndns/curlrc)" CURRENTIP="$(dig ${DOMAIN} +short)" APIURL="https://freedns.linux.pizza/api/v1/remote/updatepw?record=${RECORDID}&password=${PASSWORD}&content=${IP}" # Making stuff fancy