From 71d7c0fd0f343d9400bbab7fe0ed6768a93337d3 Mon Sep 17 00:00:00 2001
From: "Hahn Axel (hahn)" <axel.hahn@unibe.ch>
Date: Wed, 12 Apr 2023 13:53:40 +0200
Subject: [PATCH] set SKIP in output of non available db types

---
 plugins/localdump/pgsql.sh  | 2 +-
 plugins/localdump/sqlite.sh | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/plugins/localdump/pgsql.sh b/plugins/localdump/pgsql.sh
index fc4848d..4aa4b54 100755
--- a/plugins/localdump/pgsql.sh
+++ b/plugins/localdump/pgsql.sh
@@ -125,7 +125,7 @@ function restoreByFile(){
 
 checkRequirements >/dev/null 2>&1
 if [ $SERVICEFOUND -eq 0 ]; then
-  echo "__DB__$SERVICENAME INFO: service [$SERVICENAME] is not avilable on this machine."
+  echo "__DB__$SERVICENAME SKIP: service [$SERVICENAME] is not avilable on this machine."
 fi
 
 case $1 in
diff --git a/plugins/localdump/sqlite.sh b/plugins/localdump/sqlite.sh
index 64e755a..56c1687 100755
--- a/plugins/localdump/sqlite.sh
+++ b/plugins/localdump/sqlite.sh
@@ -31,6 +31,10 @@ FILEDEFS=${DIR_JOBS}/backup-dbfiles.job
 
 # make sqlite3 backups of all sqlite = ... in backup-dbfiles.job
 function doSqliteBackup(){
+  if ! _j_getvar ${FILEDEFS} "sqlite" | grep . ; then
+    echo "__DB__$SERVICENAME SKIP: no entries found for sqlite."
+    return 0
+  fi
 
   create_targetdir
 
-- 
GitLab