From ae70d9a330ec5f9aeb79ff56b3165d06309c9963 Mon Sep 17 00:00:00 2001
From: Bob Mottram <bob@robotics.uk.to>
Date: Wed, 2 Jan 2019 18:07:12 +0000
Subject: [PATCH] Exit on directory fail

---
 src/freedombone-app-matrix | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/freedombone-app-matrix b/src/freedombone-app-matrix
index c8af36225..454a2b58e 100755
--- a/src/freedombone-app-matrix
+++ b/src/freedombone-app-matrix
@@ -412,7 +412,7 @@ function create_matrix_user_removal_script {
 
     matrix_remove_user=/usr/bin/matrix-remove-user
     { echo '#!/bin/bash';
-      echo "cd $MATRIX_DATA_DIR";
+      echo "cd $MATRIX_DATA_DIR || exit 1";
       echo "remove_username=\$1";
       echo "ADMIN=\"@${MY_USERNAME}:$MATRIX_DOMAIN_NAME\"";
       echo 'BUSY="pragma busy_timeout=20000"';
-- 
GitLab