Compare commits

..

No commits in common. "038d15049114db26f8126f3b5b91b9d71a5c85f4" and "03ba17d8af41e001965fcf0e7e3ff6f2b1d966f4" have entirely different histories.

View File

@ -96,31 +96,12 @@ 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 the gate stuff might not be needed... # XXX is this actually needed???
# XXX is the IP actually needed??? #IP=$([ -z $DRY_RUN ] && lxc-attach $ID -- hostname -I)
IP=$([ -z $DRY_RUN ] && lxc-attach $ID -- hostname -I) #@ lxc-attach $ID -- bash -c "\
TRUSTED_DOMAINS=( # sed -z -i \
"${IP/ *}" # -e \"s/\\(trusted_domains[^)]*\\)/\\1 2 => '${IP/ *}',\\n /\" \
"$CTHOSTNAME" # /var/www/nextcloud/config/config.php"
"${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="${ADDRS}\ \ $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: