still fixing it
This commit is contained in:
parent
db20cdc66d
commit
478efc6898
@ -12,12 +12,7 @@ log() {
|
|||||||
# Check if screen is installed
|
# Check if screen is installed
|
||||||
if command -v screen &> /dev/null; then
|
if command -v screen &> /dev/null; then
|
||||||
log "Screen is installed, running script in a screen session..."
|
log "Screen is installed, running script in a screen session..."
|
||||||
SCRIPT_NAME="restart-qortal-every-2-hours.sh"
|
screen -S qortal_restart -dm bash -c "cd $(pwd) && bash $(realpath "$0")"
|
||||||
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"
|
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
log "Script successfully started in screen session 'qortal_restart'."
|
log "Script successfully started in screen session 'qortal_restart'."
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user