This commit is contained in:
Michael Meidlinger 2024-04-04 06:47:13 +08:00 committed by GitHub
commit 181e5dd67b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 24 additions and 0 deletions

View File

@ -361,6 +361,30 @@ echo ";";
EOF
chown www-data:www-data "$STORAGE_ROOT/owncloud/config.php"
# Update config.php in case S3 object storage backend if configured
if [[ -n "${NEXTCLOUD_S3_BUCKET:-}" && -n "${NEXTCLOUD_S3_REGION:-}" ]]; then
php$PHP_VER <<EOF > $CONFIG_TEMP && mv $CONFIG_TEMP $STORAGE_ROOT/owncloud/config.php;
<?php
include("$STORAGE_ROOT/owncloud/config.php");
\$CONFIG['objectstore'] = array(
'class' => '\\OC\\Files\\ObjectStore\\S3',
'arguments' => array(
'bucket' => '$NEXTCLOUD_S3_BUCKET',
'autocreate' => false,
'use_ssl' => true,
'region' => '$NEXTCLOUD_S3_REGION'
),
);
echo "<?php\n\\\$CONFIG = ";
var_export(\$CONFIG);
echo ";";
?>
EOF
chown www-data.www-data $STORAGE_ROOT/owncloud/config.php
fi
# Enable/disable apps. Note that this must be done after the Nextcloud setup.
# The firstrunwizard gave Josh all sorts of problems, so disabling that.
# user_external is what allows Nextcloud to use IMAP for login. The contacts