Browse Source

new: [nextcloud] remove default skeleton directory

master
Boris Gallet 10 months ago
committed by Valentin Lab
parent
commit
b8ceb65e04
  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")
mkdir -p "${dirs[@]}"
chown -R "$uid" "${dirs[@]}"
nextcloud:config:simple:add skeletondirectory "" || {
err "Failed to set ${WHITE}skeletondirectory${NORMAL} as empty."
exit 1
}

5
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."

Loading…
Cancel
Save