Browse Source

new: [nextcloud] remove skeletondirectory to save space when creating user

pull/39/head
Boris Gallet 9 months ago
parent
commit
8e0534878f
  1. 6
      nextcloud/hooks/init
  2. 5
      nextcloud/lib/common

6
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") dirs=("$SERVICE_DATASTORE/var/lib/nextcloud/data" "$SERVICE_DATASTORE/var/www/html")
mkdir -p "${dirs[@]}" mkdir -p "${dirs[@]}"
chown -R "$uid" "${dirs[@]}" chown -R "$uid" "${dirs[@]}"
nextcloud:config:simple:add skeletondirectory empty || {
err "Failed to set ${WHITE}skeletondirectory${NORMAL} as empty."
exit 1
}

5
nextcloud/lib/common

@ -154,6 +154,11 @@ nextcloud:config:simple:add() {
err "Value for '$key' is empty. Skipping." err "Value for '$key' is empty. Skipping."
return 1 return 1
fi fi
if [ "$value" == "empty" ]; then
value=""
fi
## check for \ and ' in value and key ## check for \ and ' in value and key
if [[ "$value" =~ [\\\'] ]]; then if [[ "$value" =~ [\\\'] ]]; then
err "Unsupported value for '$key' contains a backslash or a single quote." err "Unsupported value for '$key' contains a backslash or a single quote."

Loading…
Cancel
Save