From ec94a02f06fa654eb82874f7f318bcf04cb2bbc4 Mon Sep 17 00:00:00 2001 From: crowetic Date: Thu, 24 Oct 2024 14:37:15 -0700 Subject: [PATCH] further changes to methods utilized for screen --- restart-qortal-every-2-hours.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/restart-qortal-every-2-hours.sh b/restart-qortal-every-2-hours.sh index eb6f9f4..d2cdf05 100644 --- a/restart-qortal-every-2-hours.sh +++ b/restart-qortal-every-2-hours.sh @@ -6,7 +6,9 @@ QORTAL_DIR=~/qortal # Check if screen is installed if command -v screen &> /dev/null; then echo "Screen is installed, running script in a screen session..." - screen -S qortal_restart -dm bash -c "$(realpath $0)" + SCRIPT_NAME="restart-qortal-every-2-hours.sh" + cp "$0" "$QORTAL_DIR/$SCRIPT_NAME" + screen -S qortal_restart -dm bash "$QORTAL_DIR/$SCRIPT_NAME" exit 0 else echo "Screen is not installed, running script normally..."