diff --git a/restart-qortal-every-2-hours.sh b/restart-qortal-every-2-hours.sh index a1d7440..7fe0c85 100644 --- a/restart-qortal-every-2-hours.sh +++ b/restart-qortal-every-2-hours.sh @@ -8,7 +8,8 @@ while true; do cd "$QORTAL_DIR" || exit # Stop Qortal core - ./stop.sh &> stop_output.log + ./stop.sh &> stop_output.log & + stop_pid=$! # Wait for 30 seconds sleep 30 @@ -21,8 +22,13 @@ while true; do # Remove blockchain lock file rm -rf "$QORTAL_DIR/db/blockchain.lck" + else + echo "Qortal stopped gracefully." fi + # Ensure stop process completes + wait $stop_pid + # Start Qortal core ./start.sh