summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xshutdownasap6
-rwxr-xr-xshutdownasap.conf12
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