Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2024-01-08 05:43:58 +03:00
parent b4d47df7bf
commit 3784ee9265

View File

@ -70,6 +70,9 @@ sleep ${TIMEOUT:=5}
tklWaitForSetup tklWaitForSetup
# XXX this breaks the rest of this script...
echo "# Starting TKL UI..."
@ 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... # add gate IP to trusted_proxies...
@ -78,7 +81,7 @@ echo "# Updating config..."
-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... # add self IP to trusted_domains -- enable setup from local network...
IP=${DRY_RUN:=$(lxc-attach $ID -- hostname -I)} IP=$([ -z $DRY_RUN ] && lxc-attach $ID -- hostname -I)
@ lxc-attach $ID -- bash -c "\ @ lxc-attach $ID -- bash -c "\
sed -z -i \ sed -z -i \
-e \"s/\\(trusted_domains[^)]*\\)/\\1 2 => '${IP/ *}',\\n /\" \ -e \"s/\\(trusted_domains[^)]*\\)/\\1 2 => '${IP/ *}',\\n /\" \
@ -100,17 +103,9 @@ echo "# Post config..."
pctSet $ID "${OPTS_STAGE_2}" $REBOOT pctSet $ID "${OPTS_STAGE_2}" $REBOOT
# XXX this breaks the rest of this script...
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 /usr/sbin/turnkey-init'
echo "# Done." echo "# Done."
#---------------------------------------------------------------------- #----------------------------------------------------------------------
# vim:set ts=4 sw=4 : # vim:set ts=4 sw=4 :