From a88541a7a3ae91209283593ff7925cee36faa642 Mon Sep 17 00:00:00 2001 From: Luke Childs Date: Wed, 2 Sep 2020 19:11:16 +0700 Subject: [PATCH] Increase decoy backup max interval to 12 hours (#214) --- scripts/backup/decoy-trigger | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/backup/decoy-trigger b/scripts/backup/decoy-trigger index a891743..bbb784d 100755 --- a/scripts/backup/decoy-trigger +++ b/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