From c9be73601dafeb45b403cf024b37123dd6ac05cf Mon Sep 17 00:00:00 2001 From: szaimen Date: Tue, 8 Mar 2022 16:56:25 +0100 Subject: [PATCH] catch the case that datadir and mount are equal Signed-off-by: szaimen --- Containers/mastercontainer/start.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Containers/mastercontainer/start.sh b/Containers/mastercontainer/start.sh index f3b1723b..19c97a11 100755 --- a/Containers/mastercontainer/start.sh +++ b/Containers/mastercontainer/start.sh @@ -89,6 +89,12 @@ The string must be equal to/start with '/mnt/' or '/media/' or be equal to '/var exit 1 fi fi +if [ -n "$NEXTCLOUD_DATADIR" ] && [ -n "$NEXTCLOUD_MOUNT" ]; then + if [ "$NEXTCLOUD_DATADIR" = "$NEXTCLOUD_MOUNT" ]; then + echo "NEXTCLOUD_DATADIR and NEXTCLOUD_MOUNT are not allowed to be equal." + exit 1 + fi +fi if [ -n "$APACHE_PORT" ]; then if ! check_if_number "$APACHE_PORT"; then echo "You provided an Apache port but did not only use numbers"