mirror of
https://github.com/DictXiong/dotfiles.git
synced 2026-11-23 20:38:16 +08:00
[dev] enhance riot; ddns avoid burst (#38)
* riot: add . for .ibd and non for proxied * riot: 'user@..' to overwrite username, '...:22' to overwrite port, treat the arg as server name if it doesn't match any preset, sshl can accept only a port number and default to use localhost * update.sh: ddns sleep for random seconds to avoid burst * riot: support zssh and sftp, and set ssh options according to trust settings * riot: add scp * riot: support jump servers, sep by commas * common.sh: argparser supports -d/--dev and -D/--dry-run * install.sh: remove -s/--secure because of no use * riot: if remote ends with dot, treat it as a full-hostname; add tests * sagent.sh: refuse to work on windows --------- Co-authored-by: xiongdian.me <xiongdian.me@bytedance.com>
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user