diff --git a/conf/config.json b/conf/config.json index 3de9379..2e7aca8 100644 --- a/conf/config.json +++ b/conf/config.json @@ -1,10 +1,5 @@ { "system": { - "datadirectory": "#DATADIR#", - "trusted_domains": [ - "localhost", - "#DOMAIN#" - ], "updatechecker": false, "memcache.local": "\\OC\\Memcache\\APCu", "integrity.check.disabled": true, diff --git a/conf/config_install.json b/conf/config_install.json new file mode 100644 index 0000000..52bff54 --- /dev/null +++ b/conf/config_install.json @@ -0,0 +1,9 @@ +{ + "system": { + "datadirectory": "#DATADIR#", + "trusted_domains": [ + "localhost", + "#DOMAIN#" + ] + } +} diff --git a/scripts/install b/scripts/install index ee80e92..cf22534 100755 --- a/scripts/install +++ b/scripts/install @@ -144,11 +144,6 @@ exec_occ maintenance:install \ # CONFIGURE NEXTCLOUD #================================================= -nc_conf="${final_path}/config.json" -cp ../conf/config.json "$nc_conf" -ynh_replace_string "#DOMAIN#" "$domain" "$nc_conf" -ynh_replace_string "#DATADIR#" "$datadir" "$nc_conf" - # Ensure that UpdateNotification app is disabled exec_occ app:disable updatenotification @@ -156,7 +151,18 @@ exec_occ app:disable updatenotification exec_occ app:enable user_ldap exec_occ ldap:create-empty-config -# Load the config file in nextcloud +# Load the installation config file in nextcloud +nc_conf="${final_path}/config_install.json" +cp ../conf/config_install.json "$nc_conf" +ynh_replace_string "#DOMAIN#" "$domain" "$nc_conf" +ynh_replace_string "#DATADIR#" "$datadir" "$nc_conf" +exec_occ config:import "$nc_conf" +# Then remove it +rm -f "$nc_conf" + +# Load the additional config file (used also for upgrade) +nc_conf="${final_path}/config_install.json" +cp ../conf/config.json "$nc_conf" exec_occ config:import "$nc_conf" # Then remove it rm -f "$nc_conf"