From fc62b39f34b32f5d31502578f4f9a78b494b331d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Thomas=20Sj=C3=B6gren?=
 <konstruktoid@users.noreply.github.com>
Date: Tue, 23 Aug 2022 11:57:05 +0200
Subject: [PATCH] find redis.conf if /snap directory exists
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
---
 include/tests_databases | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/tests_databases b/include/tests_databases
index 7c829cd3..153e74ac 100644
--- a/include/tests_databases
+++ b/include/tests_databases
@@ -302,6 +302,12 @@
         if [ ${QNAP_DEVICE} -eq 1 ]; then
             PATHS="${PATHS} ${ROOTDIR}share/CACHEDEV1_DATA/.qpkg/QKVM/usr/etc/redis.conf"
         fi
+        if [ -d "/snap" ]; then
+          for SNAP_PATH in $(${FINDBINARY} /snap -name 'redis.conf' -type f); do
+            PATHS="${PATHS} ${SNAP_PATH}"
+          done
+        fi
+
         ALLFILES=$(${LSBINARY} ${ROOTDIR}etc/redis.conf 2> /dev/null)
         FOUND=0
         for DIR in ${PATHS}; do