Compare commits

..

No commits in common. "342f4962938715b5c6139b23c50ef210d07d1f7d" and "8185b0608a29c1927b3049801bb77d9789b2f029" have entirely different histories.

View File

@ -19,7 +19,6 @@ readConfig
webAppConfig Nextcloud webAppConfig Nextcloud
DFL_ID=${DFL_ID:=1000} DFL_ID=${DFL_ID:=1000}
DFL_CTHOSTNAME=${DFL_CTHOSTNAME:=nextcloud} DFL_CTHOSTNAME=${DFL_CTHOSTNAME:=nextcloud}
@ -42,9 +41,6 @@ LAN_GATE=SKIP
REBOOT=${REBOOT:=1} REBOOT=${REBOOT:=1}
# XXX should we ask??
COLLABORA_OFFICE=${COLLABORA_OFFICE:=1}
readVars readVars
# Nextcloud-specific configuration... # Nextcloud-specific configuration...
@ -132,8 +128,21 @@ pctPushAssets $ID
# XXX need to push proxy config to gate... # XXX need to push proxy config to gate...
# Colabora... # Colabora...
if ! [ -z $COLLABORA_OFFICE ] ; then if false ; then
echo "# Collabora office..." echo "# Colabora office..."
# apache2...
@ lxc-attach $ID -- a2enmod proxy
@ lxc-attach $ID -- a2enmod proxy_http
@ lxc-attach $ID -- a2enmod proxy_connect
@ lxc-attach $ID -- a2enmod proxy_wstunnel
# XXX TEST...
@ lxc-attach $ID -- bash -c "\
sed -i \
-e '/<VirtualHost \*:443>/,/<\/VirtualHost>/ {
/<\/VirtualHost>/ i\ Include /etc/apache2/conf-available/coolwsd.conf
}' \
/etc/apache2/sites-available/nextcloud.conf"
# coolwsd... # coolwsd...
# see: # see:
# https://sdk.collaboraonline.com/docs/installation/Configuration.html # https://sdk.collaboraonline.com/docs/installation/Configuration.html
@ -156,36 +165,19 @@ if ! [ -z $COLLABORA_OFFICE ] ; then
'/<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 coolswd
# apache2...
@ lxc-attach $ID -- a2enmod proxy
@ lxc-attach $ID -- a2enmod proxy_http
@ lxc-attach $ID -- a2enmod proxy_connect
@ lxc-attach $ID -- a2enmod proxy_wstunnel
# XXX TEST...
@ lxc-attach $ID -- bash -c "\
sed -i \
-e '/<VirtualHost \*:443>/,/<\/VirtualHost>/ {
/<\/VirtualHost>/ i\ Include /etc/apache2/conf-available/coolwsd.conf
}' \
/etc/apache2/sites-available/nextcloud.conf"
@ lxc-attach $ID -- systemctl restart apache2
# 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 richdocuments disable_certificate_verification yes
# XXX what variable should we use???
@ lxc-attach $ID -- turnkey-occ config:app:set richdocuments public_wopi_url "https://${APP_DOMAIN}" @ lxc-attach $ID -- turnkey-occ config:app:set richdocuments public_wopi_url "https://${APP_DOMAIN}"
@ lxc-attach $ID -- turnkey-occ config:app:set richdocuments wopi_url "https://${APP_DOMAIN}" @ lxc-attach $ID -- turnkey-occ config:app:set richdocuments wopi_url "https://${APP_DOMAIN}"
# XXX do we need to set this differently??? # XXX do we need this???
@ lxc-attach $ID -- turnkey-occ config:app:set richdocuments types prevent_group_restriction @ lxc-attach $ID -- turnkey-occ config:app:set richdocuments types prevent_group_restriction
@ lxc-attach $ID -- turnkey-occ config:app:set richdocuments enabled yes @ lxc-attach $ID -- turnkey-occ config:app:set richdocuments enabled yes
fi fi
echo "# Disabling fail2ban..." echo "# Disabling fail2ban..."
# NOTE: we do not need this as we'll be running from behind a reverse proxy... # NOTE: we do not need this as we'll be running from behind a reverse proxy...
# XXX revise...
# ...can we configure this for reverse proxy, or should it be on
# the reverse proxy???
@ lxc-attach $ID systemctl stop fail2ban @ lxc-attach $ID systemctl stop fail2ban
@ lxc-attach $ID systemctl disable fail2ban @ lxc-attach $ID systemctl disable fail2ban
@ -207,4 +199,4 @@ echo "# Done."
#---------------------------------------------------------------------- #----------------------------------------------------------------------
# vim:set ts=4 sw=4 nowrap : # vim:set ts=4 sw=4 :