Added debian/control|conffiles

This commit is contained in:
Jonathan Sélea 2019-12-08 15:17:54 +01:00
parent c3abe5d2be
commit 9f2af8378c
4 changed files with 26 additions and 9 deletions

1
debian/conffiles vendored Normal file
View file

@ -0,0 +1 @@
/etc/lp-dyndns/settings.conf

9
debian/control vendored Normal file
View file

@ -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

View file

@ -1,4 +1,11 @@
RECORDID="28378"
PASSWORD="pass123"
DOMAIN="test.jonathanselea.se"
# Examples:
# RECORDID="235890
# PASSWORD="verystrongpassword"
# DOMAIN="sub.domain.tld"
RECORDID=""
PASSWORD=""
DOMAIN=""

View file

@ -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