mirror of
https://github.com/nextcloud/vm.git
synced 2025-10-26 11:27:32 +00:00
15 lines
487 B
Bash
15 lines
487 B
Bash
#!/bin/bash
|
|
|
|
NCPATH=/var/www/nextcloud
|
|
ADDRESS=$(hostname -I | cut -d ' ' -f 1)
|
|
SCRIPTS=/var/scripts
|
|
|
|
# Change config.php
|
|
php $SCRIPTS/update-config.php $NCPATH/config/config.php 'trusted_domains[]' localhost ${ADDRESS[@]} $(hostname) $(hostname --fqdn) 2>&1 >/dev/null
|
|
php $SCRIPTS/update-config.php $NCPATH/config/config.php overwrite.cli.url https://$ADDRESS/ 2>&1 >/dev/null
|
|
|
|
# Change .htaccess accordingly
|
|
sed -i "s|RewriteBase /nextcloud|RewriteBase /|g" $NCPATH/.htaccess
|
|
|
|
exit 0
|