fixed typo in peer-count script

This commit is contained in:
crowetic 2024-11-04 11:48:47 -08:00
parent c8f6b7716a
commit 4aaf637579

View File

@ -64,7 +64,7 @@ main_loop() {
if [ -z "$number_of_connections" ]; then if [ -z "$number_of_connections" ]; then
log "Failed to retrieve number of connections." log "Failed to retrieve number of connections."
elif [[ "$NUMBER_OF_CONNECTIONS" =~ ^[0-9]+$ ]] && [ "$NUMBER_OF_CONNECTIONS" -lt "$ACCEPTABLE_PEERS" ]; then elif [[ "$number_of_connections" =~ ^[0-9]+$ ]] && [ "$number_of_connections" -lt "$ACCEPTABLE_PEERS" ]; then
log "Number of connections ($number_of_connections) is below acceptable threshold ($ACCEPTABLE_PEERS). Restarting Qortal..." log "Number of connections ($number_of_connections) is below acceptable threshold ($ACCEPTABLE_PEERS). Restarting Qortal..."
restart_qortal restart_qortal
else else
@ -72,6 +72,7 @@ main_loop() {
log "Set peer count: $ACCEPTABLE_PEERS" log "Set peer count: $ACCEPTABLE_PEERS"
fi fi
sleep 300 # Wait for 5 minutes before next check sleep 300 # Wait for 5 minutes before next check
done done
} }