Compare commits
No commits in common. "master" and "0.5" have entirely different histories.
4 changed files with 3 additions and 14 deletions
BIN
lp-ddns.deb
BIN
lp-ddns.deb
Binary file not shown.
|
|
@ -1,6 +1 @@
|
||||||
# Please modify this according to your needs.
|
*/30 * * * /usr/local/bin/lp-ddns >/dev/null 2>&1
|
||||||
# This crontab works on Debian, but certain distro may interpret this differently.
|
|
||||||
|
|
||||||
|
|
||||||
#@reboot /usr/local/bin/lp-ddns >/dev/null 2>&1
|
|
||||||
#*/30 * * * /usr/local/bin/lp-ddns >/dev/null 2>&1
|
|
||||||
|
|
|
||||||
|
|
@ -2,11 +2,10 @@
|
||||||
# RECORDID="235890
|
# RECORDID="235890
|
||||||
# PASSWORD="verystrongpassword"
|
# PASSWORD="verystrongpassword"
|
||||||
# DOMAIN="sub.domain.tld"
|
# DOMAIN="sub.domain.tld"
|
||||||
# NAMESERVER="NameServerToQuery"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
RECORDID=""
|
RECORDID=""
|
||||||
PASSWORD=""
|
PASSWORD=""
|
||||||
DOMAIN=""
|
DOMAIN=""
|
||||||
NAMESERVER="" #Blank for system NameServer
|
|
||||||
|
|
|
||||||
|
|
@ -14,12 +14,7 @@ set -e
|
||||||
|
|
||||||
IP="$(curl --connect-timeout 10 -s ipv4.is || curl --connect-timeout 10 -s ipv4.is)"
|
IP="$(curl --connect-timeout 10 -s ipv4.is || curl --connect-timeout 10 -s ipv4.is)"
|
||||||
#IP="$(curl --config /etc/lp-dyndns/curlrc)"
|
#IP="$(curl --config /etc/lp-dyndns/curlrc)"
|
||||||
if [ "${NAMESERVER}" = "" ];
|
|
||||||
then
|
|
||||||
CURRENTIP="$(dig ${DOMAIN} +short)"
|
CURRENTIP="$(dig ${DOMAIN} +short)"
|
||||||
else
|
|
||||||
CURRENTIP="$(dig @${NAMESERVER} ${DOMAIN} +short)"
|
|
||||||
fi
|
|
||||||
APIURL="https://freedns.linux.pizza/api/v1/remote/updatepw?record=${RECORDID}&password=${PASSWORD}&content=${IP}"
|
APIURL="https://freedns.linux.pizza/api/v1/remote/updatepw?record=${RECORDID}&password=${PASSWORD}&content=${IP}"
|
||||||
# Making stuff fancy
|
# Making stuff fancy
|
||||||
NC='\033[0m'
|
NC='\033[0m'
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue