Browse Source

Increase decoy backup max interval to 12 hours (#214)

handle-curl-fail
Luke Childs 4 years ago
committed by GitHub
parent
commit
a88541a7a3
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      scripts/backup/decoy-trigger

3
scripts/backup/decoy-trigger

@ -3,6 +3,7 @@
set -euo pipefail
UMBREL_ROOT="$(readlink -f $(dirname "${BASH_SOURCE[0]}")/../..)"
MAX_BACKUP_INTERVAL_IN_HOURS="12"
check_if_not_already_running() {
if ps ax | grep $0 | grep -v $$ | grep bash | grep -v grep
@ -29,7 +30,7 @@ main () {
while true; do
minutes_in_seconds="60"
hours_in_seconds="$((60 * ${minutes_in_seconds}))"
max_interval="$((8 * ${hours_in_seconds}))"
max_interval="$((${MAX_BACKUP_INTERVAL_IN_HOURS} * ${hours_in_seconds}))"
delay="$(shuf -i 0-${max_interval} -n 1)"
echo "Sleeping for ${delay} seconds..."
sleep $delay

Loading…
Cancel
Save