Skip to content

Commit

Permalink
🐛 Fix screen session handling
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianKropp committed Dec 9, 2024
1 parent f030fbe commit 3914dc7
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -636,10 +636,12 @@ export NVM_DIR="$HOME/.nvm"
#-------------- SCRIPT STUFF: DONT TOUCH!!! ---------------
#<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
# Check if a screen session named "install_session" exists
if screen -list | grep -q $SCREEN_NAME; then
echo "⏭️ Screen session '$SCREEN_NAME' is running. Attaching..."
screen -r $SCREEN_NAME
exit 0
if ! $STARTED_BY_CRONJOB; then
if screen -list | grep -q $SCREEN_NAME; then
echo "⏭️ Screen session '$SCREEN_NAME' is running. Attaching..."
screen -r -d $SCREEN_NAME
exit 0
fi
fi


Expand Down

0 comments on commit 3914dc7

Please sign in to comment.