diff --git a/debian/conffiles b/debian/conffiles new file mode 100644 index 0000000..fdb23e6 --- /dev/null +++ b/debian/conffiles @@ -0,0 +1 @@ +/etc/lp-dyndns/settings.conf diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..dc41457 --- /dev/null +++ b/debian/control @@ -0,0 +1,9 @@ +Package: lp-ddns +Version: 0.1a +Section: custom +Priority: optional +Architecture: all +Essential: no +Installed-Size: 16 +Maintainer: Jonathan Sélea +Description: Tool for managing Dynamic DNS toghether with FreeDNS.linux.pizza diff --git a/lp-ddns/etc/lp-dyndns/settings.conf b/lp-ddns/etc/lp-dyndns/settings.conf index d24dedc..1f1d676 100644 --- a/lp-ddns/etc/lp-dyndns/settings.conf +++ b/lp-ddns/etc/lp-dyndns/settings.conf @@ -1,4 +1,11 @@ -RECORDID="28378" -PASSWORD="pass123" -DOMAIN="test.jonathanselea.se" +# Examples: +# RECORDID="235890 +# PASSWORD="verystrongpassword" +# DOMAIN="sub.domain.tld" + + + +RECORDID="" +PASSWORD="" +DOMAIN="" diff --git a/lp-ddns/usr/local/bin/lp-ddns b/lp-ddns/usr/local/bin/lp-ddns index 69a9b09..03b75c3 100755 --- a/lp-ddns/usr/local/bin/lp-ddns +++ b/lp-ddns/usr/local/bin/lp-ddns @@ -3,9 +3,9 @@ set -e . /etc/lp-dyndns/settings.conf -#RECORDID="28378" -#PASSWORD="pass123" -#DOMAIN="test.jonathanselea.se" +#RECORDID="11111" +#PASSWORD="passss" +#DOMAIN="sub.domain.tld" # DO NOT MODIFY # @@ -24,13 +24,13 @@ YELLOW='\033[1;33m' # END -echo -e "The current external IP is ${YELLOW}${IP}${NC}" +echo -e "The current external IP is ${YELLOW}${IP}${NC}" | logger if [ "${IP}" == "${CURRENTIP}" ]; then - echo -e "${GREEN}The current IP matches the record ${DOMAIN}, no need to update.${NC}" + echo -e "${GREEN}The current IP matches the record ${DOMAIN}, no need to update.${NC}" | logger else - echo -e "${RED}Current IP does not match the record ${CURRENTIP} updating...${NC}" + echo -e "${RED}Current IP does not match the record ${CURRENTIP} updating...${NC}" | logger curl ${APIURL} fi