added dead session wipe

This commit is contained in:
Menno van Leeuwen 2024-11-11 11:27:35 +01:00
parent 88fe75b7e0
commit c9feb3d7bf
Signed by: vleeuwenmenno
SSH Key Fingerprint: SHA256:OJFmjANpakwD3F2Rsws4GLtbdz1TJ5tkQF0RZmF0TRE

View File

@ -13,7 +13,6 @@ 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
@ -24,3 +23,8 @@ for app in "${apps[@]}"; do
sleep 1
fi
done
# check if screen has any dead sessions
if screen -list | grep -q "Dead"; then
screen -wipe
fi