mirror of
https://github.com/DictXiong/dotfiles.git
synced 2024-11-24 04:47:02 +08:00
update.sh: ddns sleep for random seconds to avoid burst
This commit is contained in:
parent
8eb2088331
commit
8f3b053bbd
|
@ -13,6 +13,11 @@ apost_beacon "sys.online"
|
|||
# update dns
|
||||
if [[ "$DFS_DDNS_ENABLE" == "1" ]]; then
|
||||
fmt_info "updating dns ..."
|
||||
if ! is_tty; then
|
||||
time_to_sleep=$((RANDOM%600))
|
||||
fmt_note "sleep for $time_to_sleep seconds"
|
||||
sleep $time_to_sleep
|
||||
fi
|
||||
"$THIS_DIR/tools/frigg-client.sh" ddns || (fmt_error "failed to update dns" && apost_beacon "dfs.ddns.fail")
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user