Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 29 lines (22 sloc) 499 Bytes
#!/bin/bash
set -e -f -u -o pipefail
# shellcheck disable=SC1090
source "${HOME}/bin/backup-to-rsync-net-lib"
usage() {
printf "Usage: %s [--test-keys-only] HOSTNAME DAYS\\n" "$0" >&2
}
generate_contents() {
local sentinel_dir="$1"
shift
if [[ "$#" -ne 2 ]]; then
usage
return 1
fi
local hostname="$1" max_days="$2"
printf "%d\\n" "$((60 * 60 * 24 * max_days))" \
> "${sentinel_dir}/${hostname}.max_allowed_delay"
}
main() {
update_sentinel_file "$@"
}
main "$@"
You can’t perform that action at this time.