mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 01:39:16 -04: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:
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
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
PORTNAME= ddclient
|
PORTNAME= ddclient
|
||||||
PORTVERSION= 3.8.3
|
PORTVERSION= 3.8.3
|
||||||
PORTREVISION= 2
|
PORTREVISION= 3
|
||||||
CATEGORIES= dns
|
CATEGORIES= dns
|
||||||
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
|
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
|
||||||
|
|
||||||
|
|
|
@ -16,9 +16,16 @@ case "$daily_ddclient_force_enable" in
|
||||||
echo
|
echo
|
||||||
echo 'Forcing ddclient update:'
|
echo 'Forcing ddclient update:'
|
||||||
|
|
||||||
out=`%%PREFIX%%/sbin/ddclient -force`
|
# sleep randomly to reduce congestion on dyn dns server. In
|
||||||
echo "$out"
|
# FreeBSD 12.0 the anticongestion function should be used
|
||||||
rc=0
|
# 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
|
rc=0
|
||||||
|
|
Loading…
Add table
Reference in a new issue