Compare commits

..

No commits in common. "2ffd4b91a9b032c4a17a75a2fdbb87dcd58da55f" and "342f4962938715b5c6139b23c50ef210d07d1f7d" have entirely different histories.

2 changed files with 15 additions and 26 deletions

View File

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

View File

@ -44,7 +44,6 @@ 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
@ -118,10 +117,6 @@ done
sed -z -i \ sed -z -i \
-e \"s/\\(trusted_domains[^)]*\\)/\\1${ADDRS}/\" \ -e \"s/\\(trusted_domains[^)]*\\)/\\1${ADDRS}/\" \
/var/www/nextcloud/config/config.php" /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... # remove /index.php from urls...
# for more info see: # for more info see:
@ -132,17 +127,10 @@ done
/var/www/nextcloud/config/config.php" /var/www/nextcloud/config/config.php"
@ lxc-attach $ID -- turnkey-occ maintenance:update:htaccess @ lxc-attach $ID -- turnkey-occ maintenance:update:htaccess
echo "# Copying assets..." 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..."
# # XXX ERR need to install update before...
# @ 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..."
@ -154,27 +142,26 @@ 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 -y coolwsd code-brand" && apt install 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 coolwsd @ lxc-attach $ID -- systemctl restart coolswd
# apache2... # apache2...
@ lxc-attach $ID -- a2enmod \ @ lxc-attach $ID -- a2enmod proxy
proxy \ @ lxc-attach $ID -- a2enmod proxy_http
proxy_http \ @ lxc-attach $ID -- a2enmod proxy_connect
proxy_connect \ @ lxc-attach $ID -- a2enmod proxy_wstunnel
proxy_wstunnel
# XXX TEST... # XXX TEST...
@ lxc-attach $ID -- bash -c "\ @ lxc-attach $ID -- bash -c "\
sed -i \ sed -i \
@ -186,12 +173,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 --value yes richdocuments disable_certificate_verification @ lxc-attach $ID -- turnkey-occ config:app:set richdocuments disable_certificate_verification yes
@ 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 public_wopi_url "https://${APP_DOMAIN}"
@ lxc-attach $ID -- turnkey-occ config:app:set --value "https://${APP_DOMAIN}" richdocuments wopi_url @ 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 to set this differently???
@ lxc-attach $ID -- turnkey-occ config:app:set --value prevent_group_restriction richdocuments types @ lxc-attach $ID -- turnkey-occ config:app:set richdocuments types prevent_group_restriction
@ lxc-attach $ID -- turnkey-occ config:app:set --value yes richdocuments enabled @ lxc-attach $ID -- turnkey-occ config:app:set richdocuments enabled yes
fi fi
echo "# Disabling fail2ban..." echo "# Disabling fail2ban..."