Browse Source

Don't overwrite all settings during upgrade

pull/89/head
Jimmy Monin 8 years ago
parent
commit
40526739d2
  1. 5
      conf/config.json
  2. 9
      conf/config_install.json
  3. 18
      scripts/install

5
conf/config.json

@ -1,10 +1,5 @@
{ {
"system": { "system": {
"datadirectory": "#DATADIR#",
"trusted_domains": [
"localhost",
"#DOMAIN#"
],
"updatechecker": false, "updatechecker": false,
"memcache.local": "\\OC\\Memcache\\APCu", "memcache.local": "\\OC\\Memcache\\APCu",
"integrity.check.disabled": true, "integrity.check.disabled": true,

9
conf/config_install.json

@ -0,0 +1,9 @@
{
"system": {
"datadirectory": "#DATADIR#",
"trusted_domains": [
"localhost",
"#DOMAIN#"
]
}
}

18
scripts/install

@ -144,11 +144,6 @@ exec_occ maintenance:install \
# CONFIGURE NEXTCLOUD # 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 # Ensure that UpdateNotification app is disabled
exec_occ app:disable updatenotification exec_occ app:disable updatenotification
@ -156,7 +151,18 @@ exec_occ app:disable updatenotification
exec_occ app:enable user_ldap exec_occ app:enable user_ldap
exec_occ ldap:create-empty-config 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" exec_occ config:import "$nc_conf"
# Then remove it # Then remove it
rm -f "$nc_conf" rm -f "$nc_conf"

Loading…
Cancel
Save