Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 5 additions & 11 deletions network/trusted.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,10 @@ source /var/scripts/fetch_lib.sh
DEBUG=0
debug_mode

download_script NETWORK update-config
if [ -f $SCRIPTS/update-config.php ]
then
# Change config.php
php $SCRIPTS/update-config.php $NCPATH/config/config.php 'trusted_domains[]' localhost "${ADDRESS[@]}" "$(hostname)" "$(hostname --fqdn)" >/dev/null 2>&1
php $SCRIPTS/update-config.php $NCPATH/config/config.php overwrite.cli.url https://"$(hostname --fqdn)"/ >/dev/null 2>&1
# Change config.php
nextcloud occ config:system:set trusted_domains 3 --value=${ADDRESS[@]} "$(hostname)" "$(hostname --fqdn)"
nextcloud occ config:system:set overwrite.cli.url --value=https://"$(hostname --fqdn)"

# Change .htaccess accordingly
sed -i "s|RewriteBase /nextcloud|RewriteBase /|g" $NCPATH/.htaccess
# Change .htaccess accordingly
sed -i "s|RewriteBase /nextcloud|RewriteBase /|g" $NCPATH/.htaccess

# Cleanup
rm -f $SCRIPTS/update-config.php
fi