still fixing it

This commit is contained in:
crowetic 2024-10-24 14:54:35 -07:00
parent db20cdc66d
commit 478efc6898

View File

@ -12,12 +12,7 @@ log() {
# Check if screen is installed
if command -v screen &> /dev/null; then
log "Screen is installed, running script in a screen session..."
SCRIPT_NAME="restart-qortal-every-2-hours.sh"
SCRIPT_PATH="$(realpath "$BASH_SOURCE")"
log "Copying script from '$SCRIPT_PATH' to '$QORTAL_DIR/$SCRIPT_NAME'..."
cp "$SCRIPT_PATH" "$QORTAL_DIR/$SCRIPT_NAME"
log "Attempting to run script in screen..."
screen -S qortal_restart -dm bash -c "cd $QORTAL_DIR && bash $SCRIPT_NAME"
screen -S qortal_restart -dm bash -c "cd $(pwd) && bash $(realpath "$0")"
if [ $? -eq 0 ]; then
log "Script successfully started in screen session 'qortal_restart'."
else