From 8e0534878fe46bfd30815f5cc7db50a2211f03a0 Mon Sep 17 00:00:00 2001 From: Boris Gallet Date: Thu, 29 Feb 2024 11:58:10 +0100 Subject: [PATCH] new: [nextcloud] remove skeletondirectory to save space when creating user --- nextcloud/hooks/init | 6 ++++++ nextcloud/lib/common | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/nextcloud/hooks/init b/nextcloud/hooks/init index 4a27d8e..2756b0a 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 empty || { + 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..96f182a 100644 --- a/nextcloud/lib/common +++ b/nextcloud/lib/common @@ -154,6 +154,11 @@ nextcloud:config:simple:add() { err "Value for '$key' is empty. Skipping." return 1 fi + + if [ "$value" == "empty" ]; then + value="" + fi + ## check for \ and ' in value and key if [[ "$value" =~ [\\\'] ]]; then err "Unsupported value for '$key' contains a backslash or a single quote."