From d792c8e5e84581840524dff9bf0d28c4f2bec165 Mon Sep 17 00:00:00 2001 From: crowetic Date: Wed, 23 Oct 2024 22:01:49 -0700 Subject: [PATCH] added if statement --- restart-qortal-every-2-hours.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/restart-qortal-every-2-hours.sh b/restart-qortal-every-2-hours.sh index 4caca82..a73579e 100644 --- a/restart-qortal-every-2-hours.sh +++ b/restart-qortal-every-2-hours.sh @@ -11,14 +11,16 @@ while true; do ./stop.sh # Wait for 45 seconds - sleep 45 + sleep 30 - # Kill all Java processes - killall -9 java - - # Remove blockchain lock file - rm -rf "$QORTAL_DIR/db/blockchain.lck" + if [ -f "$QORTAL_DIR/db/blockchain.lck" ]; then + + # Kill all Java processes + killall -9 java + # Remove blockchain lock file + rm -rf "$QORTAL_DIR/db/blockchain.lck" + fi # Start Qortal core ./start.sh