From 7a3b06c77c3d515c613a1fc1e8ee95fe76428c59 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Sun, 10 Apr 2016 13:05:53 +0200 Subject: fuer .12 angepasst --- shutdownasap | 6 ++++-- shutdownasap.conf | 12 ++++++++---- 2 files changed, 12 insertions(+), 6 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}" diff --git a/shutdownasap.conf b/shutdownasap.conf index 4ff6198..50d32eb 100755 --- a/shutdownasap.conf +++ b/shutdownasap.conf @@ -6,14 +6,18 @@ waitForDir="/home/shutdown/.warteauf" declare -A shutDownNoGos -shutDownNoGos["rsync"]="rsync" shutDownNoGos["backup"]="[^/ ]*backup" -shutDownNoGos["prt-get"]="prt-get" +shutDownNoGos["dd"]="dd" +shutDownNoGos["ncat"]="ncat" shutDownNoGos["ports"]="ports" +shutDownNoGos["prt-get"]="prt-get" shutDownNoGos["rsync"]="rsync" shutDownNoGos["wget"]="wget" -shutDownNoGos["dd"]="dd" -shutDownNoGos["ncat"]="ncat" +shutDownNoGos["wetter"]="/tmp/wetter.pid" + +beforeWatchHook() { + true +} beforeShutDownHook() { true -- cgit v1.2.3-54-g00ecf