Remove logger, added cronjob every 30 minutes

This commit is contained in:
Jonathan Sélea 2019-12-13 15:21:53 +00:00
parent 1a94bba074
commit 5687980764
5 changed files with 7 additions and 5 deletions

View file

@ -1 +1,2 @@
/etc/lp-dyndns/settings.conf
/etc/cron.d/lp-ddns

View file

@ -3,8 +3,8 @@ Section: custom
Priority: optional
Maintainer: Jonathan Sélea <jonathan@selea.se>
Package: lp-ddns
Version: 0.1a
Standard-Version: 0.1a
Version: 0.1b
Standard-Version: 0.1b
Architecture: all
Essential: no
Depends-On: curl

View file

@ -0,0 +1 @@
*/30 * * * * lp-ddns >/dev/null 2>&1

View file

@ -24,13 +24,13 @@ YELLOW='\033[1;33m'
# END
echo -e "The current external IP is ${YELLOW}${IP}${NC}" | logger
echo -e "The current external IP is ${YELLOW}${IP}${NC}"
if [ "${IP}" == "${CURRENTIP}" ];
then
echo -e "${GREEN}The current IP matches the record ${DOMAIN}, no need to update.${NC}" | logger
echo -e "${GREEN}The current IP matches the record ${DOMAIN}, no need to update.${NC}"
else
echo -e "${RED}Current IP does not match the record ${CURRENTIP} updating...${NC}" | logger
echo -e "${RED}Current IP does not match the record ${CURRENTIP} updating...${NC}"
curl ${APIURL}
fi