mirror of
https://github.com/flynx/proxmox-utils.git
synced 2025-10-29 19:20:10 +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"
|
/var/www/nextcloud/config/config.php"
|
||||||
|
|
||||||
# add self IP to trusted_domains -- enable setup from local network...
|
# add self IP to trusted_domains -- enable setup from local network...
|
||||||
# XXX is this actually needed???
|
# XXX the gate stuff might not be needed...
|
||||||
#IP=$([ -z $DRY_RUN ] && lxc-attach $ID -- hostname -I)
|
# XXX is the IP actually needed???
|
||||||
#@ lxc-attach $ID -- bash -c "\
|
IP=$([ -z $DRY_RUN ] && lxc-attach $ID -- hostname -I)
|
||||||
# sed -z -i \
|
TRUSTED_DOMAINS = (
|
||||||
# -e \"s/\\(trusted_domains[^)]*\\)/\\1 2 => '${IP/ *}',\\n /\" \
|
"${IP/ *}"
|
||||||
# /var/www/nextcloud/config/config.php"
|
"$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...
|
# remove /index.php from urls...
|
||||||
# for more info see:
|
# for more info see:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user