#!/bin/bash # configuration file for shutdownasap # it should be named #ETCDIR#/shutdownasap.conf # shutdownasap's pid pidFile="/tmp/shutdownasap.pid" # directory must be empty before shutdown waitForDir="/home/shutdown/.warteauf" # list of processes which must not be running before shutdown declare -A shutDownNoGoProcesses shutDownNoGoProcesses["backup"]="[^/ ]*backup" shutDownNoGoProcesses["dd"]="dd" shutDownNoGoProcesses["ncat"]="ncat" shutDownNoGoProcesses["ports"]="ports" shutDownNoGoProcesses["prt-get"]="prt-get" shutDownNoGoProcesses["rsync"]="rsync" shutDownNoGoProcesses["wget"]="wget" # list of PID files whose processes must not be running before shutdown declare -A shutDownNoGoFiles shutDownNoGoFiles["wetter"]="/tmp/wetter.pid" # hook to execute after start of shutdownasap, before watching above conditions beforeWatchHook() { true } # hook to execute before shutting down beforeShutDownHook() { true }