]> Freerunner's - dotfiles.git/commitdiff
scripts: improve winecleaner
authorAndre Ramnitz <tux.rising@gmail.com>
Fri, 6 Sep 2024 01:44:45 +0000 (03:44 +0200)
committerAndre Ramnitz <tux.rising@gmail.com>
Sun, 8 Sep 2024 11:05:48 +0000 (13:05 +0200)
local/dot-local/bin/winecleaner

index 3a28176cd2e2e32afd35bc86d14758be6bb9847f..26f795ad9c9e6099f3515833b60a93ce0bf54177 100755 (executable)
@@ -16,10 +16,14 @@ echo "Grepping ps for wine executables..."
 if [ -n "$PSOUTPUT" ]; then
     echo "The following processes have been found:"
     echo "$PSOUTPUT"
-    yes_or_no "Would you like to send sigkill to all processes?" && pgrep exe | xargs kill
+    yes_or_no "Would you like to send sigTERM to all processes?" && pgrep exe | xargs kill
     echo "Verifying that all processes have been cleaned..."
     sleep 7
     PSOUTPUT="$(pgrep -l exe)"
+    echo "After sending sigterm to every process, these ones still remain:"
+    echo "$PSOUTPUT"
+    yes_or_no "Would you like to send sigKILL to all processes?" && pgrep exe | xargs kill -9
+    echo "Verifying that all processes have been cleaned..."
     if [ -n "$PSOUTPUT" ]; then
         echo "Still some processes around. Please remove them manually..."
         echo "$PSOUTPUT"
@@ -29,3 +33,4 @@ if [ -n "$PSOUTPUT" ]; then
 else
     echo "No wine executables found"
 fi
+