everything just thoughts and not tested. do not do this on production server!
a) brute force: remove the removing of collabora during the onlyoffice installation and see what happens:
print_text_in_color "$ICyan" "Keeping mod_evasive active."
else
a2dismod evasive
# a2dismod mod-evasive # not needed, but existing in the Extra Security script.
apt purge libapache2-mod-evasive -y
systemctl restart apache2
fi
fi
# Check if collabora is installed and remove every trace of it
if does_this_docker_exist 'collabora/code'
then
msg_box "You can't run both Collabora and OnlyOffice on the same VM. We will now remove Collabora from the server."
# Remove docker image
docker_prune_this 'collabora/code'
# Revoke LE
SUBDOMAIN=$(whiptail --title "T&M Hansson IT - OnlyOffice" --inputbox "Please enter the subdomain you are using for Collabora, eg: office.yourdomain.com" "$WT_HEIGHT" "$WT_WIDTH" 3>&1 1>&2 2>&3)
if [ -f "$CERTFILES/$SUBDOMAIN/cert.pem" ]
then
yes no | certbot revoke --cert-path "$CERTFILES/$SUBDOMAIN/cert.pem"
REMOVE_OLD="$(find "$LETSENCRYPTPATH/" -name "$SUBDOMAIN*")"
b) brute force: remove the removing of onlyoffice during the collabora installation and see what happens:
;;
*)
;;
esac
else
print_text_in_color "$ICyan" "Installing Collabora..."
fi
# Check if OnlyOffice is previously installed
# If yes, then stop and prune the docker container
if does_this_docker_exist 'onlyoffice/documentserver'
then
docker_prune_this 'onlyoffice/documentserver'
# Revoke LE
SUBDOMAIN=$(whiptail --title "T&M Hansson IT - Collabora" --inputbox "Please enter the subdomain you are using for OnlyOffice, eg: office.yourdomain.com" "$WT_HEIGHT" "$WT_WIDTH" 3>&1 1>&2 2>&3)
if [ -f "$CERTFILES/$SUBDOMAIN/cert.pem" ]
then
yes no | certbot revoke --cert-path "$CERTFILES/$SUBDOMAIN/cert.pem"
REMOVE_OLD="$(find "$LETSENCRYPTPATH/" -name "$SUBDOMAIN*")"
for remove in $REMOVE_OLD
do rm -rf "$remove"
d) install collabora via the vm-skript and install the nextcloud onlyoffice app afterwards manually.
d) ask @enoch85 why he put the code in place. may be his setting really can’t handle both office versions. i can imagine that you get conflict in the apache conflict.
e) you may try my playbook. it will install both.
nextcloud-reloaded
Ansible playbook to install nextcloud, php, nginx or apache, mariadb or postgres, redis-server, onlyoffice or collabora office