mirror of
https://github.com/flynx/proxmox-utils.git
synced 2025-10-29 11:10:09 +00:00
updated nextcloud config generation...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
03ba17d8af
commit
14bf16d8c1
@ -96,12 +96,31 @@ echo "# Updating config..."
|
||||
/var/www/nextcloud/config/config.php"
|
||||
|
||||
# add self IP to trusted_domains -- enable setup from local network...
|
||||
# XXX is this actually needed???
|
||||
#IP=$([ -z $DRY_RUN ] && lxc-attach $ID -- hostname -I)
|
||||
#@ lxc-attach $ID -- bash -c "\
|
||||
# sed -z -i \
|
||||
# -e \"s/\\(trusted_domains[^)]*\\)/\\1 2 => '${IP/ *}',\\n /\" \
|
||||
# /var/www/nextcloud/config/config.php"
|
||||
# XXX the gate stuff might not be needed...
|
||||
# XXX is the IP actually needed???
|
||||
IP=$([ -z $DRY_RUN ] && lxc-attach $ID -- hostname -I)
|
||||
TRUSTED_DOMAINS = (
|
||||
"${IP/ *}"
|
||||
"$CTHOSTNAME"
|
||||
"${CTHOSTNAME}.srv"
|
||||
"${GATE_LAN_IPn}"
|
||||
"$(GATE_HOSTNAME)"
|
||||
"$(GATE_HOSTNAME).srv"
|
||||
"${WAN_IPn}"
|
||||
)
|
||||
ADDRS=
|
||||
i=2
|
||||
for addr in "${TRUSTED_DOMAINS[@]}" ; do
|
||||
if [ -z "$addr" ] ; then
|
||||
continue
|
||||
fi
|
||||
ADDRS="${ADDTS} $i => '${addr//\//\\/}',\\n"
|
||||
i=$(( i + 1 ))
|
||||
done
|
||||
@ lxc-attach $ID -- bash -c "\
|
||||
sed -z -i \
|
||||
-e \"s/\\(trusted_domains[^)]*\\)/\\1${ADDRS}/\" \
|
||||
/var/www/nextcloud/config/config.php"
|
||||
|
||||
# remove /index.php from urls...
|
||||
# for more info see:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user