From b8ceb65e04e9256a485ba1e2a568e88d7de6eff3 Mon Sep 17 00:00:00 2001 From: Boris Gallet Date: Thu, 29 Feb 2024 11:58:10 +0100 Subject: [PATCH] new: [nextcloud] remove default skeleton directory --- nextcloud/hooks/init | 6 ++++++ nextcloud/lib/common | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/nextcloud/hooks/init b/nextcloud/hooks/init index 4a27d8e..32d120c 100755 --- a/nextcloud/hooks/init +++ b/nextcloud/hooks/init @@ -76,3 +76,9 @@ uid=$(docker_get_uid "$MASTER_BASE_SERVICE_NAME" "www-data") dirs=("$SERVICE_DATASTORE/var/lib/nextcloud/data" "$SERVICE_DATASTORE/var/www/html") mkdir -p "${dirs[@]}" chown -R "$uid" "${dirs[@]}" + + +nextcloud:config:simple:add skeletondirectory "" || { + err "Failed to set ${WHITE}skeletondirectory${NORMAL} as empty." + exit 1 +} \ No newline at end of file diff --git a/nextcloud/lib/common b/nextcloud/lib/common index a923608..a32901e 100644 --- a/nextcloud/lib/common +++ b/nextcloud/lib/common @@ -150,10 +150,11 @@ nextcloud:config:simple:add() { return 1 fi - if [ -z "$value" ]; then - err "Value for '$key' is empty. Skipping." + if [ "$#" -lt 2 ]; then + err "No value specified for '$key'." return 1 fi + ## check for \ and ' in value and key if [[ "$value" =~ [\\\'] ]]; then err "Unsupported value for '$key' contains a backslash or a single quote."