From 1d0409a257bedad9e019c017fc512e9ca4474442 Mon Sep 17 00:00:00 2001 From: "Hahn Axel (hahn)" <axel.hahn@unibe.ch> Date: Thu, 21 Dec 2023 10:49:53 +0100 Subject: [PATCH] small updates --- check_backup_one | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/check_backup_one b/check_backup_one index 7b14002..4a11aff 100755 --- a/check_backup_one +++ b/check_backup_one @@ -1,13 +1,10 @@ #!/bin/bash # ====================================================================== # -# WORK IN PROGRESS +# Check IML BACKUP SERVER # -# Check ONE BACKUP connection count -# -# requirements access to storage_helper.sh -# ls -ld /opt/imlbackup/server/ -# drwxr-x--- 3 imlbackup imlbackup 4096 Jul 27 06:25 /opt/imlbackup/server/ +# requires access to storage_helper.sh +# in /opt/imlbackup/server/ # # ---------------------------------------------------------------------- # 2020-07-27 v0.x <axel.hahn@iml.unibe.ch> @@ -38,7 +35,7 @@ You can get the count of connections or the status of server backup. See https://os-docs.iml.unibe.ch/iml-backup-server/ SYNTAX: -$_self [-d DIRECTORY] +$_self [-d DIRECTORY] -m MODE OPTIONS: -h or --help show this help. @@ -105,11 +102,13 @@ case "$sMode" in typeset -i iDisable; iDisable=$( _getStatusCount "D" "$data" ) typeset -i iRunning; iRunning=$( _getStatusCount "R" "$data") - if [ $iErrors -gt 0 ]; then ph.setStatus critical fi - ph.status "Server Backups - $iTotal server - $iErrors errors - $iDisable disbled" + if [ $iNotStarted -eq $iTotal ]; then + ph.setStatus unknown + fi + ph.status "Server Backups - $iTotal servers in backup - $iErrors errors - $iDisable disbled - $iRunning running" echo List of server backups grouped by status echo ( -- GitLab