diff --git a/script/monitor/generic/ZFS_SYNC_CHECK.sh b/script/monitor/generic/ZFS_SYNC_CHECK.sh index 2f2a33c..6c84aad 100755 --- a/script/monitor/generic/ZFS_SYNC_CHECK.sh +++ b/script/monitor/generic/ZFS_SYNC_CHECK.sh @@ -75,8 +75,8 @@ function checkSync() { for _COMPOSITION_PATH in ${_COMPOSITIONS}*; do # If remote host is found than it is responsible for this container-composition, otherwise skip - # (grep -E "^something" means. Line has to start with "something".) - grep -E "^${_REMOTE_HOSTNAME_SHORT}" "${_COMPOSITION_PATH}/zfssync-hosts" &> /dev/null \ + # (grep -E "^[[:blank:]]*something" means. Line has to start with "something", leading blank chars are ok.) + grep -E "^[[:blank:]]*${_REMOTE_HOSTNAME_SHORT}" "${_COMPOSITION_PATH}/zfssync-hosts" &> /dev/null \ || continue; _COMPOSITION_NAME="${_COMPOSITION_PATH##*/}" #Removes longest matching pattern '*/' from the begin