testing...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2024-01-08 04:01:44 +03:00
parent 5bf2dfa893
commit dfccbb0819

View File

@ -97,10 +97,11 @@ echo "# Starting TKL UI..."
@ lxc-attach $ID -- bash -c "HUB_APIKEY=SKIP SEC_UPDATES=SKIP /usr/sbin/turnkey-init" @ lxc-attach $ID -- bash -c "HUB_APIKEY=SKIP SEC_UPDATES=SKIP /usr/sbin/turnkey-init"
echo "# Updating config..." echo "# Updating config..."
# add gate IP to trusted_proxies...
@ lxc-attach $ID -- sed -i \ @ lxc-attach $ID -- sed -i \
-e "/trusted_domains/i\ 'trusted_proxies' =>\n array (\n '${GATE_LAN_IP}/32',\n )," \ -e "/trusted_domains/i\ 'trusted_proxies' =>\n array (\n '${GATE_LAN_IP}/32',\n )," \
-e "/trusted_domains[^(]*([^)]*)/i\ 'trusted_proxies' =>\n array (\n '${GATE_LAN_IP}/32',\n )," \
/var/www/nextcloud/config/config.php /var/www/nextcloud/config/config.php
# add self IP to trusted_domains -- enable setup from local network...
IP=${DRY_RUN:=$(lxc-attach $ID -- hostname -I)} IP=${DRY_RUN:=$(lxc-attach $ID -- hostname -I)}
@ lxc-attach $ID -- sed -z -i \ @ lxc-attach $ID -- sed -z -i \
-e "s/\(trusted_domains[^)]*\)/\1 2 => '${IP/ *}',\n /" \ -e "s/\(trusted_domains[^)]*\)/\1 2 => '${IP/ *}',\n /" \