mirror of
https://github.com/flynx/proxmox-utils.git
synced 2025-10-28 18:50:08 +00:00
Compare commits
3 Commits
342f496293
...
2ffd4b91a9
| Author | SHA1 | Date | |
|---|---|---|---|
| 2ffd4b91a9 | |||
| 3570c15632 | |||
| 189e2fad04 |
@ -287,12 +287,10 @@ 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
|
||||||
|
|||||||
@ -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
|
||||||
|
|
||||||
@ -117,6 +118,10 @@ 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:
|
||||||
@ -127,10 +132,17 @@ 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..."
|
||||||
@ -142,26 +154,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 +186,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..."
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user