Compare commits

...

3 Commits

Author SHA1 Message Date
2ffd4b91a9 tweaking...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
2024-12-13 05:37:07 +03:00
3570c15632 minor tweak...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
2024-12-13 05:11:47 +03:00
189e2fad04 fixes...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
2024-12-13 05:09:49 +03:00
2 changed files with 26 additions and 15 deletions

View File

@ -287,12 +287,10 @@ xreadpass(){
local PASS2
for attempt in 1 2 3 ; do
read -sep "${prefix}${msg}password (Enter to skip): " PASS1
echo
if [ -z $PASS1 ] ; then
return
fi
read -sep "${prefix}retype password: " PASS2
echo
if [[ $PASS1 != $PASS2 ]] ; then
echo "ERROR: passwords do not match." >&2
continue

View File

@ -44,6 +44,7 @@ REBOOT=${REBOOT:=1}
# XXX should we ask??
COLLABORA_OFFICE=${COLLABORA_OFFICE:=1}
NEXTCLOUD_UPGRADE=${NEXTCLOUD_UPGRADE:=1}
readVars
@ -117,6 +118,10 @@ done
sed -z -i \
-e \"s/\\(trusted_domains[^)]*\\)/\\1${ADDRS}/\" \
/var/www/nextcloud/config/config.php"
@ lxc-attach $ID -- bash -c "\
sed -i \
-e '/^\$CONFIG =/ a\ '\''opcache.interned_strings_buffer'\'' => 32,' \
/var/www/nextcloud/config/config.php"
# remove /index.php from urls...
# for more info see:
@ -127,10 +132,17 @@ done
/var/www/nextcloud/config/config.php"
@ lxc-attach $ID -- turnkey-occ maintenance:update:htaccess
echo "# Copying assets..."
pctPushAssets $ID
# XXX need to push proxy config to gate...
#if ! [ -z $NEXTCLOUD_UPGRADE ] ; then
# echo "# Upgrade nextcloud..."
# # XXX ERR need to install update before...
# @ lxc-attach $ID -- turnkey-occ upgrade
#fi
# Colabora...
if ! [ -z $COLLABORA_OFFICE ] ; then
echo "# Collabora office..."
@ -142,26 +154,27 @@ if ! [ -z $COLLABORA_OFFICE ] ; then
&& wget https://collaboraoffice.com/downloads/gpg/collaboraonline-release-keyring.gpg"
@ lxc-attach $ID -- bash -c "\
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 ???
# /etc/coolwsd/coolwsd.xml
# ssl>enable -> false
@ lxc-attach $ID -- bash -c "\
sed -i \
'/<ssl /,+5{ s/\(<enable [^>]*>\)true\(</enable>\)/\1false\2/ }' \
'/<ssl /,+5{ s/\(<enable [^>]*>\)true\(<\/enable>\)/\1false\2/ }' \
/etc/coolwsd/coolwsd.xml"
# ssl>termination -> true
@ lxc-attach $ID -- bash -c "\
sed -i \
'/<ssl /,+5{ s/\(<termination [^>]*>\)false\(</termination>\)/\1true\2/ }' \
'/<ssl /,+5{ s/\(<termination [^>]*>\)false\(<\/termination>\)/\1true\2/ }' \
/etc/coolwsd/coolwsd.xml"
@ lxc-attach $ID -- systemctl restart coolswd
@ lxc-attach $ID -- systemctl restart coolwsd
# apache2...
@ lxc-attach $ID -- a2enmod proxy
@ lxc-attach $ID -- a2enmod proxy_http
@ lxc-attach $ID -- a2enmod proxy_connect
@ lxc-attach $ID -- a2enmod proxy_wstunnel
@ lxc-attach $ID -- a2enmod \
proxy \
proxy_http \
proxy_connect \
proxy_wstunnel
# XXX TEST...
@ lxc-attach $ID -- bash -c "\
sed -i \
@ -173,12 +186,12 @@ if ! [ -z $COLLABORA_OFFICE ] ; then
# nextcloud...
@ 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 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 --value yes richdocuments disable_certificate_verification
@ lxc-attach $ID -- turnkey-occ config:app:set --value "https://${APP_DOMAIN}" richdocuments public_wopi_url
@ lxc-attach $ID -- turnkey-occ config:app:set --value "https://${APP_DOMAIN}" richdocuments wopi_url
# 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 richdocuments enabled yes
@ lxc-attach $ID -- turnkey-occ config:app:set --value prevent_group_restriction richdocuments types
@ lxc-attach $ID -- turnkey-occ config:app:set --value yes richdocuments enabled
fi
echo "# Disabling fail2ban..."