This commit is contained in:
mwiegand 2021-06-20 15:58:13 +02:00
parent 6bbaf624f2
commit ef2b190964
2 changed files with 29 additions and 54 deletions

View file

@ -1,65 +1,21 @@
<?php <?php
$CONFIG = array ( $CONFIG = array (
'instanceid' => 'ocfnc48njsxw', 'passwordsalt' => 'jySy/iELFRob7rRpecEXAI2Rn1gbNI',
'passwordsalt' => 'xxx', 'secret' => 'wj3r+B2/NS8X/ETWCTnwwrNy+dyy2OSWRCVQxDE8+UZBJrRd',
'secret' => 'xxx',
'trusted_domains' => 'trusted_domains' =>
array ( array (
0 => 'cloud.sublimity.de', 0 => 'localhost',
),
'trusted_proxies' =>
array (
0 => 'cloud.sublimity.de',
), ),
'datadirectory' => '/var/lib/nextcloud', 'datadirectory' => '/var/lib/nextcloud',
'overwrite.cli.url' => 'https://cloud.sublimity.de', 'dbtype' => 'pgsql',
'overwriteprotocol' => 'https', 'version' => '21.0.2.1',
'dbtype' => 'mysql', 'overwrite.cli.url' => 'http://localhost',
'version' => '21.0.1.1',
'dbname' => 'nextcloud', 'dbname' => 'nextcloud',
'dbhost' => 'localhost', 'dbhost' => 'localhost',
'dbport' => '', 'dbport' => '',
'dbtableprefix' => 'oc_', 'dbtableprefix' => 'oc_',
'dbuser' => 'nextcloud', 'dbuser' => 'nextcloud',
'dbpassword' => 'xxx', 'dbpassword' => 'JQImkLIeaa38whvJ1lBj3UeMqNt0SH33',
'instanceid' => 'oc3wqc1kg39w',
'installed' => true, 'installed' => true,
'updater.release.channel' => 'stable',
'maintenance' => false,
'memcache.local' => '\\OC\\Memcache\\Redis',
'memcache.locking' => '\\OC\\Memcache\\Redis',
'theme' => '',
'default_phone_region' => 'DE',
'loglevel' => 0,
'preview_max_x' => 1280,
'preview_max_y' => 1280,
'preview_max_scale_factor' => 1,
'user_backends' =>
array (
0 =>
array (
'class' => 'OC_User_IMAP',
'arguments' =>
array (
0 => '{mail.sublimity.de:143}',
),
),
),
'mail_smtpmode' => 'smtp',
'mail_smtpauthtype' => 'PLAIN',
'mail_smtpsecure' => 'tls',
'mail_from_address' => 'cloud',
'mail_domain' => 'sublimity.de',
'mail_smtphost' => 'mail.sublimity.de',
'mail_smtpport' => '587',
'mail_smtpauth' => 1,
'mail_smtpname' => 'xxx',
'mail_smtppassword' => 'xxx',
'mysql.utf8mb4' => true,
'app_install_overwrite' =>
array (
0 => 'spreed',
1 => 'camerarawpreviews',
2 => 'calendar',
3 => 'previewgenerator',
),
); );

View file

@ -49,12 +49,28 @@ actions['chown_/opt/nextcloud/config'] = {
], ],
} }
files['/opt/nextcloud/config/config.php'] = {
'owner': 'www-data',
'group': 'www-data',
'mode': '0770',
'needs': [
'action:extract_nextcloud',
],
}
directories[node.metadata.get('nextcloud/data_dir')] = { directories[node.metadata.get('nextcloud/data_dir')] = {
'owner': 'www-data', 'owner': 'www-data',
'group': 'www-data', 'group': 'www-data',
'mode': '0770', 'mode': '0770',
} }
actions['set_nextcloud_uninstalled'] = {
'command': """sed -i "/installed/d" /opt/nextcloud/config/config.php""",
'triggered': True,
'needs': [
'file:/opt/nextcloud/config/config.php',
],
}
actions['install_nextcloud'] = { actions['install_nextcloud'] = {
'command': occ( 'command': occ(
'maintenance:install', 'maintenance:install',
@ -68,18 +84,21 @@ actions['install_nextcloud'] = {
admin_pass=node.metadata.get('nextcloud/admin_pass'), admin_pass=node.metadata.get('nextcloud/admin_pass'),
data_dir=node.metadata.get('nextcloud/data_dir'), data_dir=node.metadata.get('nextcloud/data_dir'),
), ),
'unless': occ('status') + ' | grep -q "installed: true"', 'unless': """
psql -At -d nextcloud -c "SELECT 'OK' FROM information_schema.tables WHERE table_name='oc_users' AND table_schema='public'" | grep -q "^OK$"
""",
'needs': [ 'needs': [
f"directory:{node.metadata.get('nextcloud/data_dir')}", f"directory:{node.metadata.get('nextcloud/data_dir')}",
'directory:/opt/nextcloud', 'directory:/opt/nextcloud',
'directory:/opt/nextcloud/config', 'directory:/opt/nextcloud/config',
'directory:/opt/nextcloud/apps', 'directory:/opt/nextcloud/apps',
'file:/opt/nextcloud/config/config.php',
'action:chown_/opt/nextcloud/config', 'action:chown_/opt/nextcloud/config',
'action:chown_/opt/nextcloud/apps', 'action:chown_/opt/nextcloud/apps',
'action:extract_nextcloud', 'action:extract_nextcloud',
], ],
'preceded_by': [ 'preceded_by': [
f'download:/tmp/nextcloud-{version}.tar.bz2', f'action:set_nextcloud_uninstalled',
], ],
} }