server: bkctld-check-setup : Warn when inc and rm are running at the same time
All checks were successful
gitea/evobackup/pipeline/head This commit looks good

This commit is contained in:
Ludovic Poujol 2025-01-14 10:39:23 +01:00
parent 8147ba84ee
commit a419e0262d
Signed by: lpoujol
SSH key fingerprint: SHA256:YZbQWfjHONnvIGkFZMs0xRKtqzqGqwtZU+kCOKhZXPA

View file

@ -90,6 +90,17 @@ else
[ "${return}" -le 2 ] && return=2
fi
# Warn about inc/rm operations running at the same time
nb_inc_running=$(pgrep --count bkctld-inc)
nb_rm_running=$(pgrep --count bkctld-rm)
if [ "${nb_inc_running}" -ge 1 ] && [ "${nb_rm_running}" -eq 1 ]; then
nb_warn=$((nb_warn + 1))
output="${output}WARNING - Inc and rm operations running simulteanously\n"
[ "${return}" -le 1 ] && return=1
else
output="${output}OK - No inc and rm operations running simulteanously.\n"
nb_ok=$((nb_ok + 1))
fi
[ "${return}" -ge 0 ] && header="OK"
[ "${return}" -ge 1 ] && header="WARNING"