Nextcloud thinks it needs to run the upgrade/migration tool if the version number in its configuration file does not match the running version. It then updates the config file with the correct version. The next time the configuration policy is applied, however, the version will revert back to whatever is set in the template. This will re-trigger the upgrade notification. To avoid this problem, we now set the version in the configuration file dynamically. Nextcloud writes its version number in a constant in `version.php`.
70 lines
1.9 KiB
Django/Jinja
70 lines
1.9 KiB
Django/Jinja
<?php
|
|
$CONFIG = array (
|
|
'config_is_read_only' => true,
|
|
'htaccess.RewriteBase' => '/',
|
|
'memcache.local' => '\\OC\\Memcache\\APCu',
|
|
'apps_paths' =>
|
|
array (
|
|
0 =>
|
|
array (
|
|
'path' => '/usr/share/nextcloud/apps',
|
|
'url' => '/apps',
|
|
'writable' => false,
|
|
),
|
|
1 =>
|
|
array (
|
|
'path' => '/var/lib/nextcloud/apps',
|
|
'url' => '/apps-appstore',
|
|
'writable' => true,
|
|
),
|
|
),
|
|
'instanceid' => '{{ nextcloud_instanceid }}',
|
|
'passwordsalt' => '{{ nextcloud_passwordsalt }}',
|
|
'secret' => '{{ nextcloud_secret }}',
|
|
'trusted_proxies' =>
|
|
array (
|
|
{% for addr in nextcloud_trusted_proxies %}
|
|
{{ loop.index0 }} => '{{ addr }}',
|
|
{% endfor %}
|
|
),
|
|
'trusted_domains' =>
|
|
array (
|
|
{% for name in nextcloud_trusted_domains %}
|
|
{{ loop.index0 }} => '{{ name }}',
|
|
{% endfor %}
|
|
),
|
|
'datadirectory' => '/var/lib/nextcloud/data',
|
|
'dbtype' => 'pgsql',
|
|
'version' => '{{ nc_version }}',
|
|
'overwrite.cli.url' => 'https://{{ nextcloud_server_name }}',
|
|
'dbname' => 'nextcloud',
|
|
'dbhost' => 'localhost',
|
|
'dbport' => '',
|
|
'dbtableprefix' => 'oc_',
|
|
'dbuser' => 'nextcloud',
|
|
'dbpassword' => '{{ nextcloud_db_password }}',
|
|
'installed' => true,
|
|
'ldapIgnoreNamingRules' => false,
|
|
'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
|
|
'maintenance' => {{ nextcloud_maintenance|bool|string|lower }},
|
|
'theme' => '',
|
|
'loglevel' => 2,
|
|
{% if nextcloud_smtp is defined %}
|
|
'mail_from_address' => '{{ nextcloud_smtp.from.split("@")[0] }}',
|
|
'mail_smtpmode' => 'smtp',
|
|
'mail_sendmailmode' => 'smtp',
|
|
'mail_domain' => '{{ nextcloud_smtp.from.split("@")[1] }}',
|
|
'mail_smtphost' => '{{ nextcloud_smtp.host }}',
|
|
'mail_smtpport' => '{{ nextcloud_smtp.port }}',
|
|
{% endif %}
|
|
'filelocking.enabled' => true,
|
|
'memcache.distributed' => '\\OC\\Memcache\\Redis',
|
|
'memcache.locking' => '\\OC\\Memcache\\Redis',
|
|
'redis' =>
|
|
array (
|
|
'host' => 'localhost',
|
|
'port' => 6379,
|
|
'timeout' => 0.0,
|
|
),
|
|
);
|