Remove logger, added cronjob every 30 minutes
This commit is contained in:
parent
1a94bba074
commit
5687980764
5 changed files with 7 additions and 5 deletions
|
|
@ -1 +1,2 @@
|
|||
/etc/lp-dyndns/settings.conf
|
||||
/etc/cron.d/lp-ddns
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
1
lp-ddns/etc/cron.d/lp-ddns
Normal file
1
lp-ddns/etc/cron.d/lp-ddns
Normal file
|
|
@ -0,0 +1 @@
|
|||
*/30 * * * * lp-ddns >/dev/null 2>&1
|
||||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue