Move config to separate catalogue
This commit is contained in:
parent
64cc535f02
commit
2cf0aa3afe
2 changed files with 7 additions and 8 deletions
|
|
@ -1,2 +1,4 @@
|
||||||
# lp-dyndns
|
# lp-dyndns
|
||||||
|
|
||||||
|
This is the buildsource for the lp-dyndns package - mean for being distributed to users of FreeDNS.linux.pizza
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
. /etc/lp-dyndns/settings.conf
|
||||||
|
|
||||||
RECORDID="28378"
|
#RECORDID="28378"
|
||||||
PASSWORD="pass123"
|
#PASSWORD="pass123"
|
||||||
DOMAIN="test.jonathanselea.se"
|
#DOMAIN="test.jonathanselea.se"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# DO NOT MODIFY #
|
# DO NOT MODIFY #
|
||||||
|
|
@ -27,14 +27,11 @@ echo -e "The current external IP is ${YELLOW}${IP}${NC}"
|
||||||
|
|
||||||
if [ "${IP}" == "${CURRENTIP}" ];
|
if [ "${IP}" == "${CURRENTIP}" ];
|
||||||
then
|
then
|
||||||
echo -e "${GREEN}The current IP matches the record, no need to update.${NC}"
|
echo -e "${GREEN}The current IP matches the record ${DOMAIN}, no need to update.${NC}"
|
||||||
else
|
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}"
|
||||||
curl ${APIURL}
|
curl ${APIURL}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
logger
|
|
||||||
sleep 300
|
|
||||||
|
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue