1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-20 08:27:15 +00:00

Use anticongestion in dns/ddclient

Introduced in src r316342, the anticongestion feature unifies multiple
periodic scripts' disparate sleeps.

PR:		218442
Approved by:	mjl@luckie.org.nz (maintainer)
Approved by:	brd (ports)
This commit is contained in:
Alan Somers 2017-05-20 02:27:54 +00:00
parent 89e9977d0c
commit 41a8b72ca8
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=441283
2 changed files with 11 additions and 4 deletions

View File

@ -3,7 +3,7 @@
PORTNAME= ddclient
PORTVERSION= 3.8.3
PORTREVISION= 2
PORTREVISION= 3
CATEGORIES= dns
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}

View File

@ -16,9 +16,16 @@ case "$daily_ddclient_force_enable" in
echo
echo 'Forcing ddclient update:'
out=`%%PREFIX%%/sbin/ddclient -force`
echo "$out"
rc=0
# sleep randomly to reduce congestion on dyn dns server. In
# FreeBSD 12.0 the anticongestion function should be used
# instead of a hard-coded sleep
if [ -n "$anticongestion_sleeptime" ]; then
anticongestion
else
sleep `jot -r 1 0 900`
fi
%%PREFIX%%/sbin/ddclient -force || rc=3
;;
*)
rc=0