From 87f9a890bd146796c4b794f997b504fe9e956875 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 4 Aug 2020 13:24:10 +0200 Subject: shutdownasap.conf: simplify additionalWatchHookFast() --- shutdownasap.conf.in | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/shutdownasap.conf.in b/shutdownasap.conf.in index d04d3ea..3ea4422 100755 --- a/shutdownasap.conf.in +++ b/shutdownasap.conf.in @@ -38,12 +38,9 @@ beforeWatchHook() { # 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 ! check-if-bareos-backup-is-running; then - return 1 - else - return 0 - fi + if command -v check-if-bareos-backup-is-running \ + && ! check-if-bareos-backup-is-running; then + return 1 fi return 0 } -- cgit v1.2.3-70-g09d2