diff options
author | Erich Eckner <git@eckner.net> | 2016-04-10 13:05:53 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2016-04-10 13:05:53 +0200 |
commit | 7a3b06c77c3d515c613a1fc1e8ee95fe76428c59 (patch) | |
tree | 9a38d2d137e20d598e3db9b84fe8e841a3fb50c5 | |
parent | ee45f2e79c67d17ba4c0a67617d6a08f85af085e (diff) | |
download | shutdownasap-7a3b06c77c3d515c613a1fc1e8ee95fe76428c59.tar.xz |
fuer .12 angepasstv0.1
-rwxr-xr-x | shutdownasap | 6 | ||||
-rwxr-xr-x | 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 |