From 2c884b70089ee4e4d2fe20461dd4786ea11440f2 Mon Sep 17 00:00:00 2001 From: nachoparker Date: Mon, 20 Nov 2017 10:21:01 +0100 Subject: [PATCH] nc-datadir: dont create dir if not exists --- etc/nextcloudpi-config.d/nc-datadir.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/etc/nextcloudpi-config.d/nc-datadir.sh b/etc/nextcloudpi-config.d/nc-datadir.sh index 7283f7ae2..dd678e169 100644 --- a/etc/nextcloudpi-config.d/nc-datadir.sh +++ b/etc/nextcloudpi-config.d/nc-datadir.sh @@ -50,7 +50,8 @@ configure() } local BASEDIR=$( dirname "$DATADIR_" ) - mkdir -p "$BASEDIR" + + [ -d "$BASEDIR" ] || { echo "$BASEDIR does not exist"; return 1; } grep -q ext <( stat -fc%T "$BASEDIR" ) || { echo -e "Only ext filesystems can hold the data directory"; return 1; }