Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2024-12-13 05:09:49 +03:00
parent 342f496293
commit 189e2fad04

View File

@ -44,6 +44,7 @@ REBOOT=${REBOOT:=1}
# XXX should we ask?? # XXX should we ask??
COLLABORA_OFFICE=${COLLABORA_OFFICE:=1} COLLABORA_OFFICE=${COLLABORA_OFFICE:=1}
NEXTCLOUD_UPGRADE=${NEXTCLOUD_UPGRADE:=1}
readVars readVars
@ -131,6 +132,11 @@ echo "# Copying assets..."
pctPushAssets $ID pctPushAssets $ID
# XXX need to push proxy config to gate... # XXX need to push proxy config to gate...
if ! [ -z $NEXTCLOUD_UPGRADE ] ; then
echo "# Upgrade nextcloud..."
@ lxc-attach $ID -- turnkey-occ upgrade
fi
# Colabora... # Colabora...
if ! [ -z $COLLABORA_OFFICE ] ; then if ! [ -z $COLLABORA_OFFICE ] ; then
echo "# Collabora office..." echo "# Collabora office..."
@ -142,26 +148,27 @@ if ! [ -z $COLLABORA_OFFICE ] ; then
&& wget https://collaboraoffice.com/downloads/gpg/collaboraonline-release-keyring.gpg" && wget https://collaboraoffice.com/downloads/gpg/collaboraonline-release-keyring.gpg"
@ lxc-attach $ID -- bash -c "\ @ lxc-attach $ID -- bash -c "\
apt update \ apt update \
&& apt install coolwsd code-brand" && apt install -y coolwsd code-brand"
# XXX should these be set in here or as args in the coolwsd.service ??? # XXX should these be set in here or as args in the coolwsd.service ???
# /etc/coolwsd/coolwsd.xml # /etc/coolwsd/coolwsd.xml
# ssl>enable -> false # ssl>enable -> false
@ lxc-attach $ID -- bash -c "\ @ lxc-attach $ID -- bash -c "\
sed -i \ sed -i \
'/<ssl /,+5{ s/\(<enable [^>]*>\)true\(</enable>\)/\1false\2/ }' \ '/<ssl /,+5{ s/\(<enable [^>]*>\)true\(<\/enable>\)/\1false\2/ }' \
/etc/coolwsd/coolwsd.xml" /etc/coolwsd/coolwsd.xml"
# ssl>termination -> true # ssl>termination -> true
@ lxc-attach $ID -- bash -c "\ @ lxc-attach $ID -- bash -c "\
sed -i \ sed -i \
'/<ssl /,+5{ s/\(<termination [^>]*>\)false\(</termination>\)/\1true\2/ }' \ '/<ssl /,+5{ s/\(<termination [^>]*>\)false\(<\/termination>\)/\1true\2/ }' \
/etc/coolwsd/coolwsd.xml" /etc/coolwsd/coolwsd.xml"
@ lxc-attach $ID -- systemctl restart coolswd @ lxc-attach $ID -- systemctl restart coolwsd
# apache2... # apache2...
@ lxc-attach $ID -- a2enmod proxy @ lxc-attach $ID -- a2enmod \
@ lxc-attach $ID -- a2enmod proxy_http proxy \
@ lxc-attach $ID -- a2enmod proxy_connect proxy_http \
@ lxc-attach $ID -- a2enmod proxy_wstunnel proxy_connect \
proxy_wstunnel
# XXX TEST... # XXX TEST...
@ lxc-attach $ID -- bash -c "\ @ lxc-attach $ID -- bash -c "\
sed -i \ sed -i \
@ -173,12 +180,12 @@ if ! [ -z $COLLABORA_OFFICE ] ; then
# nextcloud... # nextcloud...
@ lxc-attach $ID -- turnkey-occ app:install richdocuments @ lxc-attach $ID -- turnkey-occ app:install richdocuments
@ lxc-attach $ID -- turnkey-occ config:app:set richdocuments disable_certificate_verification yes @ lxc-attach $ID -- turnkey-occ config:app:set --value yes richdocuments disable_certificate_verification
@ lxc-attach $ID -- turnkey-occ config:app:set richdocuments public_wopi_url "https://${APP_DOMAIN}" @ lxc-attach $ID -- turnkey-occ config:app:set --value "https://${APP_DOMAIN}" richdocuments public_wopi_url
@ lxc-attach $ID -- turnkey-occ config:app:set richdocuments wopi_url "https://${APP_DOMAIN}" @ lxc-attach $ID -- turnkey-occ config:app:set --value "https://${APP_DOMAIN}" richdocuments wopi_url
# XXX do we need to set this differently??? # XXX do we need to set this differently???
@ lxc-attach $ID -- turnkey-occ config:app:set richdocuments types prevent_group_restriction @ lxc-attach $ID -- turnkey-occ config:app:set --value prevent_group_restriction richdocuments types
@ lxc-attach $ID -- turnkey-occ config:app:set richdocuments enabled yes @ lxc-attach $ID -- turnkey-occ config:app:set --value yes richdocuments enabled
fi fi
echo "# Disabling fail2ban..." echo "# Disabling fail2ban..."