summaryrefslogtreecommitdiff
path: root/shutdownasap
diff options
context:
space:
mode:
Diffstat (limited to 'shutdownasap')
-rwxr-xr-xshutdownasap6
1 files changed, 4 insertions, 2 deletions
diff --git a/shutdownasap b/shutdownasap
index 366b1f0..027511b 100755
--- a/shutdownasap
+++ b/shutdownasap
@@ -6,6 +6,8 @@
echo $$ > "${pidFile}"
+beforeWatchHook
+
i=1
while [ ${i} -gt 0 ]
do
@@ -14,7 +16,7 @@ do
nochwarten=false
- if ls -1A "${waitForDir}" | grep -q "."
+ if [ -d "${waitForDir}" ] && ls -1A "${waitForDir}" | grep -q "."
then
nochwarten=true
echo ".warteauf: "
@@ -40,7 +42,7 @@ do
for s in "${!shutDownNoGos[@]}"
do
- if echo "${prozesse}" | grep -q "\(\s\|/\)${shutDownNoGos[${s}]}\(\$\|\s\)"
+ if [ -e "${shutDownNoGos[${s}]}" ] || echo "${prozesse}" | grep -q "\(\s\|/\)${shutDownNoGos[${s}]}\(\$\|\s\)"
then
nochwarten=true
echo "prozess: ${s}"