From cec823359ba49cf8bed25944115d111dd50d06b9 Mon Sep 17 00:00:00 2001 From: "Hahn Axel (hahn)" <axel.hahn@iml.unibe.ch> Date: Wed, 23 Mar 2022 11:13:15 +0100 Subject: [PATCH] FIX: exit with error if backup error occured --- check_clientbackup | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/check_clientbackup b/check_clientbackup index 46b8b59..373fc69 100755 --- a/check_clientbackup +++ b/check_clientbackup @@ -12,6 +12,7 @@ # 2022-03-07 v1.5 <axel.hahn@iml.unibe.ch> update scan for results in transfer # 2022-03-18 v1.6 <axel.hahn@iml.unibe.ch> show dumped databases # 2022-03-21 v1.7 <axel.hahn@iml.unibe.ch> show databases infos for couchdb2 too +# 2022-03-23 v1.8 <axel.hahn@iml.unibe.ch> FIX: exit with error if backup error occured # ====================================================================== . $( dirname $0 )/inc_pluginfunctions @@ -24,8 +25,9 @@ if [ ! -x $sChecker ]; then ph.abort "$sChecker not found - maybe clientbackup is not installed." fi -result=$( $sChecker | sed "s#\[[0-9][0-9]*m# #g" ) +result=$( $sChecker ) rc=$? +result=${result//\[[0-9][0-9]*m/ } if [ $rc -eq 0 ]; then ph.setStatus "ok" -- GitLab