Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
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
4 changes: 3 additions & 1 deletion lets-encrypt/test-new-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ then
fi

# Set trusted domains
run_script NETWORK trusted
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)"
nextcloud_occ maintenance:update:htaccess

# Add crontab
cat << CRONTAB > "$SCRIPTS/letsencryptrenew.sh"
Expand Down
16 changes: 4 additions & 12 deletions network/trusted.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,8 @@ 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)"
nextcloud_occ maintenance:update:htaccess

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

# Cleanup
rm -f $SCRIPTS/update-config.php
fi
4 changes: 3 additions & 1 deletion nextcloud-startup-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,9 @@ mesg n
ROOTNEWPROFILE

# Set trusted domain in config.php
run_script NETWORK trusted
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)"
nextcloud_occ maintenance:update:htaccess

# Upgrade system
print_text_in_color "$ICyan" "System will now upgrade..."
Expand Down