From c9feb3d7bf3e822c55ba5264ce90e2c4af35764f Mon Sep 17 00:00:00 2001 From: Menno van Leeuwen Date: Mon, 11 Nov 2024 11:27:35 +0100 Subject: [PATCH] added dead session wipe --- bin/actions/auto-start.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bin/actions/auto-start.sh b/bin/actions/auto-start.sh index b0a91b2..7f81d9f 100755 --- a/bin/actions/auto-start.sh +++ b/bin/actions/auto-start.sh @@ -13,14 +13,18 @@ apps=( echo "Starting auto-start applications..." for app in "${apps[@]}"; do if [ -x "$(command -v $app)" ]; then - # Check if there's already a screen session with the same name if screen -list | grep -q $app; then echo "$app is already running. Skipping..." continue fi - + echo "Starting $app..." screen -dmS $app $app sleep 1 fi done + +# check if screen has any dead sessions +if screen -list | grep -q "Dead"; then + screen -wipe +fi