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
All checks were successful
gitea/evobackup/pipeline/head This commit looks good
This commit is contained in:
parent
8147ba84ee
commit
a419e0262d
1 changed files with 11 additions and 0 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Reference in a new issue