diff options
author | enoch85 <enoch85@gmail.com> | 2016-06-03 16:27:39 +0300 |
---|---|---|
committer | enoch85 <enoch85@gmail.com> | 2016-06-03 16:27:39 +0300 |
commit | ec5cb1753f2e6e0b571ee9bcf07a1b38674b88cc (patch) | |
tree | 8151588ec7b80e23b020c36fa33c43aaa7aed2e2 /static/trusted.sh | |
parent | 87a7170e40dbae964210c61f31ed5d8c7e98c35b (diff) |
first commit
Diffstat (limited to 'static/trusted.sh')
-rw-r--r-- | static/trusted.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/static/trusted.sh b/static/trusted.sh new file mode 100644 index 00000000..b8603d97 --- /dev/null +++ b/static/trusted.sh @@ -0,0 +1,14 @@ +#!/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 |