Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/vm.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorszaimen <szaimen@e.mail.de>2021-05-25 10:54:38 +0300
committerGitHub <noreply@github.com>2021-05-25 10:54:38 +0300
commit9dfe0b7213b91e5e571ea1a98883c8787f338ccb (patch)
treecbcac01b698a63bc752a0dc28e35b02ceb2cb65b /apps/collabora_integrated.sh
parent4a4edc508ba92bd02d8c3c50e8f75f20d3ca833a (diff)
reorganize office scripts (#1989)
Diffstat (limited to 'apps/collabora_integrated.sh')
-rw-r--r--apps/collabora_integrated.sh68
1 files changed, 30 insertions, 38 deletions
diff --git a/apps/collabora_integrated.sh b/apps/collabora_integrated.sh
index b511d972..598f0619 100644
--- a/apps/collabora_integrated.sh
+++ b/apps/collabora_integrated.sh
@@ -20,6 +20,25 @@ debug_mode
# Check if root
root_check
+# Check if Collabora is installed using the new method
+if ! is_app_installed richdocumentscode
+then
+ # Ask for installing
+ install_popup "$SCRIPT_NAME"
+else
+ # Ask for removal or reinstallation
+ reinstall_remove_menu "$SCRIPT_NAME"
+ # Removal
+ nextcloud_occ app:remove richdocumentscode
+ # Disable Collabora App if activated
+ if is_app_installed richdocuments
+ then
+ nextcloud_occ app:remove richdocuments
+ fi
+ # Show successful uninstall if applicable
+ removal_popup "$SCRIPT_NAME"
+fi
+
# Check if Collabora is installed using the old method
if does_this_docker_exist 'collabora/code'
then
@@ -27,16 +46,6 @@ then
We will now remove the old docker and install the app from Nextcloud instead."
# Remove docker image
docker_prune_this 'collabora/code'
- # Disable RichDocuments (Collabora App) if activated
- if is_app_installed richdocuments
- then
- nextcloud_occ app:remove richdocuments
- fi
- # Disable OnlyOffice (Collabora App) if activated
- if is_app_installed onlyoffice
- then
- nextcloud_occ app:remove onlyoffice
- fi
# Revoke LE
SUBDOMAIN=$(input_box_flow "Please enter the subdomain you are using for Collabora, e.g: office.yourdomain.com")
if [ -f "$CERTFILES/$SUBDOMAIN/cert.pem" ]
@@ -68,28 +77,6 @@ We will now remove the old docker and install the app from Nextcloud instead."
done
fi
-# Check if Collabora is installed using the new method
-if ! is_app_installed richdocumentscode
-then
- # Ask for installing
- install_popup "$SCRIPT_NAME"
-else
- # Ask for removal or reinstallation
- reinstall_remove_menu "$SCRIPT_NAME"
- # Removal
- nextcloud_occ app:remove richdocumentscode
- # Disable Collabora App if activated
- if is_app_installed richdocuments
- then
- nextcloud_occ app:remove richdocuments
- fi
- # Show successful uninstall if applicable
- removal_popup "$SCRIPT_NAME"
-fi
-
-# Check if Nextcloud is installed with TLS
-check_nextcloud_https "Collabora (Integrated)"
-
# Check if Onlyoffice is installed and remove every trace of it
if does_this_docker_exist 'onlyoffice/documentserver'
then
@@ -125,12 +112,6 @@ then
count=$((count+1))
fi
done
-else
- # Remove OnlyOffice app
- if is_app_installed onlyoffice
- then
- nextcloud_occ app:remove onlyoffice
- fi
fi
# remove OnlyOffice-documentserver if activated
@@ -146,12 +127,21 @@ then
nextcloud_occ app:remove onlyoffice
fi
+# Disable RichDocuments (Collabora App) if activated
+if is_app_installed richdocuments
+then
+ nextcloud_occ app:remove richdocuments
+fi
+
# Nextcloud 19 is required.
lowest_compatible_nc 19
ram_check 2 Collabora
cpu_check 2 Collabora
+# Check if Nextcloud is installed with TLS
+check_nextcloud_https "Collabora (Integrated)"
+
# Install Collabora
msg_box "We will now install Collabora.
@@ -173,5 +163,7 @@ then
msg_box "The Collabora app failed to install. Please try again later."
fi
+nextcloud_occ config:app:set richdocuments public_wopi_url --value="$(nextcloud_occ_no_check config:system:get overwrite.cli.url)"
+
# Just make sure the script exits
exit