diff options
author | Erich Eckner <git@eckner.net> | 2020-03-30 22:37:14 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2020-03-30 22:37:14 +0200 |
commit | 7452af237b00b10c82cff0e5962357181690a912 (patch) | |
tree | 82254f08db868cd6d1b921f06dd598d76f645818 /shutdownasap.conf.in | |
parent | 7244caf5f06a5984726f402763402a22d788478a (diff) | |
download | shutdownasap-7452af237b00b10c82cff0e5962357181690a912.tar.xz |
additionalWatchHook -> additionalWatchHookSlow, additionalWatchHookFast
Diffstat (limited to 'shutdownasap.conf.in')
-rwxr-xr-x | shutdownasap.conf.in | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/shutdownasap.conf.in b/shutdownasap.conf.in index 7558407..d42892c 100755 --- a/shutdownasap.conf.in +++ b/shutdownasap.conf.in @@ -30,10 +30,9 @@ beforeWatchHook() { true } -# hook to execute if we believe, the system should come down -# If this hook returns with 0, everything is ok - if it returns with 1, -# we should keep waiting for shutdown (and ask this hook again). -additionalWatchHook() { +# This hook should return != 0, if we should keep waiting for shutdown. +# Note, that it is queried often. +additionalWatchHookFast() { if command -v check-if-bareos-backup-is-running; then if ! sudo check-if-bareos-backup-is-running; then return 1 @@ -44,6 +43,12 @@ additionalWatchHook() { return 0 } +# This hook should return != 0, if we should keep waiting for shutdown. +# Note, that it is queried seldom (e.g. once, if it returns 0). +additionalWatchHookSlow() { + return 0 +} + # hook to execute before shutting down beforeShutDownHook() { if command -v doalogwatch >/dev/null; then |