From 9ca72be81516758bc813e7b27ad2fa994df2f7d9 Mon Sep 17 00:00:00 2001 From: crowetic Date: Mon, 4 Nov 2024 12:05:41 -0800 Subject: [PATCH] further modifications to peer count restart script --- peer-count-auto-restart.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/peer-count-auto-restart.sh b/peer-count-auto-restart.sh index 8891e7f..e214001 100755 --- a/peer-count-auto-restart.sh +++ b/peer-count-auto-restart.sh @@ -72,7 +72,6 @@ main_loop() { log "Set peer count: $ACCEPTABLE_PEERS" fi - sleep 300 # Wait for 5 minutes before next check done } @@ -84,7 +83,8 @@ if [ "$USE_SCREEN" = true ]; then log "Acceptable peer count set: $ACCEPTABLE_PEERS" screen -x peer_count_monitor else - screen -dmS peer_count_monitor bash -c "$(declare -f log get_number_of_connections restart_qortal main_loop); ACCEPTABLE_PEERS=$ACCEPTABLE_PEERS; main_loop" + screen -dmS peer_count_monitor bash -c "$(declare -f log get_number_of_connections restart_qortal main_loop); ACCEPTABLE_PEERS=$ACCEPTABLE_PEERS; QORTAL_DIR=$QORTAL_DIR; LOG_FILE=$LOG_FILE; main_loop" + main_loop" log "Started in a new screen session." log "Acceptable peer count set: $ACCEPTABLE_PEERS" fi