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-07-09 16:21:18 +0300
committerGitHub <noreply@github.com>2021-07-09 16:21:18 +0300
commitc262de4eec2158cef8191386e6abd22e0272b182 (patch)
treef2bc7ba42314992656ae99e7596fcdc2f3551611
parent89e77e3d817bd42ace213a66e09b0c3bb25d68d8 (diff)
Preparations for the next NC22.0.0 NcVM release (#1997)22.0.0
-rw-r--r--CHANGELOG.md40
-rw-r--r--apps/collabora_docker.sh110
-rw-r--r--apps/collabora_integrated.sh91
-rw-r--r--apps/onlyoffice_docker.sh107
-rw-r--r--apps/onlyoffice_integrated.sh96
-rw-r--r--apps/pico_cms.sh35
-rw-r--r--lib.sh60
-rw-r--r--nextcloud-startup-script.sh18
8 files changed, 121 insertions, 436 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ed96bacf..a5bbfc2e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -15,6 +15,46 @@ If you run Hyper-V or want 500 GB, 1 TB or 2 TB VM you can download it from [T&M
PR's are more than welcome. Happy Nextclouding!
+## 22.0.0
+
+### Small changelog:
+- Add SMTP2GO to SMTP-Relay
+- Remove APCu and replace with Redis instead
+- Made it possible to add subdomains to deSEC
+- Improved spinner_loading
+- Added dates to automatic updates log
+- Added regular ZFS snapshot prune
+- Added retention for Nextclouds user activities
+- Previewgenerator - allow to clear all previews
+- Update script - update Nextclouds mimetype list
+- Moved mimteype update to nextcloud_configuration menu
+- Reworked office scripts
+- Update script - change crontab on all installations to 5 minutes
+- Fixed a bug with Netdata
+- Geoblock - updated link to csv file
+- Refactored the bitwarden_mailconfig script
+- Added more functionality to curl_to_dir
+- Docker documentserver - don't restart docker daemon upon installation
+- Restart notify push in some situations
+- Make sure sudo and software-properties-common is installed
+- Fixed password generation in edge cases
+- Reworked the cookielifetime script
+- Updated geoblock database - June 2021
+- Added option to check for 0-byte files
+- Changed from apt to apt-get
+- Simplified ClamAV notifications and small fix to fail2ban notification
+- Harden-SSH script - allow to set up 2FA authentication
+- SMB-server - added option to automatically empty recylce bins
+- SMB-server - added option to empty all recycle bins
+- SMB-server - Create the files directory for new users directly during the user creation
+- Reworked system-restore
+- Minor bugfixes and improvements
+- And more...
+
+### Full changelog:
+- https://github.com/nextcloud/vm/compare/21.0.2..21.0.3
+- https://nextcloud.com/changelog/#latest21
+
## 21.0.2
### Small changelog:
diff --git a/apps/collabora_docker.sh b/apps/collabora_docker.sh
index 1632d46d..35e3d486 100644
--- a/apps/collabora_docker.sh
+++ b/apps/collabora_docker.sh
@@ -17,66 +17,6 @@ debug_mode
# Check if root
root_check
-# TODO: remove all functions with NC21.0.3 release
-remove_all_office_apps() {
- # remove OnlyOffice-documentserver if installed
- if is_app_installed documentserver_community
- then
- nextcloud_occ app:remove documentserver_community
- fi
-
- # Disable OnlyOffice App if installed
- if is_app_installed onlyoffice
- then
- nextcloud_occ app:remove onlyoffice
- fi
-
- # remove richdocumentscode-documentserver if installed
- if is_app_installed richdocumentscode
- then
- nextcloud_occ app:remove richdocumentscode
- fi
-
- # Disable RichDocuments (Collabora App) if installed
- if is_app_installed richdocuments
- then
- nextcloud_occ app:remove richdocuments
- fi
-}
-add_to_trusted_domains() {
- local element="$1"
- local count=0
- print_text_in_color "$ICyan" "Adding $element to trusted domains..."
- while [ "$count" -le 10 ]
- do
- if [ "$(nextcloud_occ_no_check config:system:get trusted_domains "$count")" = "$element" ]
- then
- break
- elif [ -z "$(nextcloud_occ_no_check config:system:get trusted_domains "$count")" ]
- then
- nextcloud_occ_no_check config:system:set trusted_domains "$count" --value="$element"
- break
- else
- count=$((count+1))
- fi
- done
-}
-remove_from_trusted_domains() {
- local element="$1"
- local count=0
- print_text_in_color "$ICyan" "Removing $element from trusted domains..."
- while [ "$count" -lt 10 ]
- do
- if [ "$(nextcloud_occ_no_check config:system:get trusted_domains "$count")" = "$element" ]
- then
- nextcloud_occ_no_check config:system:delete trusted_domains "$count"
- break
- else
- count=$((count+1))
- fi
- done
-}
-
# Check if Collabora is already installed
print_text_in_color "$ICyan" "Checking if Collabora is already installed..."
if ! does_this_docker_exist 'collabora/code'
@@ -87,33 +27,7 @@ else
# Ask for removal or reinstallation
reinstall_remove_menu "$SCRIPT_NAME"
# Removal
- # Check if Collabora is previously installed
- # If yes, then stop and prune the docker container
- docker_prune_this 'collabora/code'
- # 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" ]
- 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"
- done
- fi
- # Remove Apache2 config
- if [ -f "$SITES_AVAILABLE/$SUBDOMAIN.conf" ]
- then
- a2dissite "$SUBDOMAIN".conf
- restart_webserver
- rm -f "$SITES_AVAILABLE/$SUBDOMAIN.conf"
- fi
- # Disable RichDocuments (Collabora App) if activated
- if is_app_installed richdocuments
- then
- nextcloud_occ app:remove richdocuments
- fi
- # Remove trusted domain
- remove_from_trusted_domains "$SUBDOMAIN"
+ remove_collabora_docker
# Show successful uninstall if applicable
removal_popup "$SCRIPT_NAME"
fi
@@ -122,26 +36,8 @@ fi
# 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=$(input_box_flow "Please enter the subdomain you are using for OnlyOffice, e.g: office.yourdomain.com")
- 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"
- done
- fi
- # Remove Apache2 config
- if [ -f "$SITES_AVAILABLE/$SUBDOMAIN.conf" ]
- then
- a2dissite "$SUBDOMAIN".conf
- restart_webserver
- rm -f "$SITES_AVAILABLE/$SUBDOMAIN.conf"
- fi
- # Remove trusted domain
- remove_from_trusted_domains "$SUBDOMAIN"
+ # Removal
+ remove_onlyoffice_docker
fi
# Remove all office apps
diff --git a/apps/collabora_integrated.sh b/apps/collabora_integrated.sh
index 87843cbc..b57a95a1 100644
--- a/apps/collabora_integrated.sh
+++ b/apps/collabora_integrated.sh
@@ -20,48 +20,6 @@ debug_mode
# Check if root
root_check
-# TODO: remove all functions with NC21.0.3 release
-remove_all_office_apps() {
- # remove OnlyOffice-documentserver if installed
- if is_app_installed documentserver_community
- then
- nextcloud_occ app:remove documentserver_community
- fi
-
- # Disable OnlyOffice App if installed
- if is_app_installed onlyoffice
- then
- nextcloud_occ app:remove onlyoffice
- fi
-
- # remove richdocumentscode-documentserver if installed
- if is_app_installed richdocumentscode
- then
- nextcloud_occ app:remove richdocumentscode
- fi
-
- # Disable RichDocuments (Collabora App) if installed
- if is_app_installed richdocuments
- then
- nextcloud_occ app:remove richdocuments
- fi
-}
-remove_from_trusted_domains() {
- local element="$1"
- local count=0
- print_text_in_color "$ICyan" "Removing $element from trusted domains..."
- while [ "$count" -lt 10 ]
- do
- if [ "$(nextcloud_occ_no_check config:system:get trusted_domains "$count")" = "$element" ]
- then
- nextcloud_occ_no_check config:system:delete trusted_domains "$count"
- break
- else
- count=$((count+1))
- fi
- done
-}
-
# Check if Collabora is installed using the new method
if ! is_app_installed richdocumentscode
then
@@ -84,56 +42,15 @@ fi
# Check if Collabora is installed using the old method
if does_this_docker_exist 'collabora/code'
then
- msg_box "Your server is compatible with the new way of installing Collabora. \
-We will now remove the old docker and install the app from Nextcloud instead."
- # Remove docker image
- docker_prune_this 'collabora/code'
- # 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" ]
- 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"
- done
- fi
- # Remove Apache2 config
- if [ -f "$SITES_AVAILABLE/$SUBDOMAIN.conf" ]
- then
- a2dissite "$SUBDOMAIN".conf
- restart_webserver
- rm -f "$SITES_AVAILABLE/$SUBDOMAIN.conf"
- fi
- # Remove trusted domain
- remove_from_trusted_domains "$SUBDOMAIN"
+ # Removal
+ remove_collabora_docker
fi
# Check if Onlyoffice is installed and remove every trace of it
if does_this_docker_exist 'onlyoffice/documentserver'
then
- msg_box "You can't run both Collabora and OnlyOffice on the same VM. We will now remove Onlyoffice from the server."
- # Remove docker image
- docker_prune_this 'onlyoffice/documentserver'
- # Revoke LE
- SUBDOMAIN=$(input_box_flow "Please enter the subdomain you are using for Onlyoffice, e.g: office.yourdomain.com")
- 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"
- done
- fi
- # Remove Apache2 config
- if [ -f "$SITES_AVAILABLE/$SUBDOMAIN.conf" ]
- then
- a2dissite "$SUBDOMAIN".conf
- restart_webserver
- rm -f "$SITES_AVAILABLE/$SUBDOMAIN.conf"
- fi
- # Remove trusted domain
- remove_from_trusted_domains "$SUBDOMAIN"
+ # Removal
+ remove_onlyoffice_docker
fi
# Remove all office apps
diff --git a/apps/onlyoffice_docker.sh b/apps/onlyoffice_docker.sh
index 897582f3..2fb877ff 100644
--- a/apps/onlyoffice_docker.sh
+++ b/apps/onlyoffice_docker.sh
@@ -17,66 +17,6 @@ debug_mode
# Check if root
root_check
-# TODO: remove all functions with NC21.0.3 release
-remove_all_office_apps() {
- # remove OnlyOffice-documentserver if installed
- if is_app_installed documentserver_community
- then
- nextcloud_occ app:remove documentserver_community
- fi
-
- # Disable OnlyOffice App if installed
- if is_app_installed onlyoffice
- then
- nextcloud_occ app:remove onlyoffice
- fi
-
- # remove richdocumentscode-documentserver if installed
- if is_app_installed richdocumentscode
- then
- nextcloud_occ app:remove richdocumentscode
- fi
-
- # Disable RichDocuments (Collabora App) if installed
- if is_app_installed richdocuments
- then
- nextcloud_occ app:remove richdocuments
- fi
-}
-add_to_trusted_domains() {
- local element="$1"
- local count=0
- print_text_in_color "$ICyan" "Adding $element to trusted domains..."
- while [ "$count" -le 10 ]
- do
- if [ "$(nextcloud_occ_no_check config:system:get trusted_domains "$count")" = "$element" ]
- then
- break
- elif [ -z "$(nextcloud_occ_no_check config:system:get trusted_domains "$count")" ]
- then
- nextcloud_occ_no_check config:system:set trusted_domains "$count" --value="$element"
- break
- else
- count=$((count+1))
- fi
- done
-}
-remove_from_trusted_domains() {
- local element="$1"
- local count=0
- print_text_in_color "$ICyan" "Removing $element from trusted domains..."
- while [ "$count" -lt 10 ]
- do
- if [ "$(nextcloud_occ_no_check config:system:get trusted_domains "$count")" = "$element" ]
- then
- nextcloud_occ_no_check config:system:delete trusted_domains "$count"
- break
- else
- count=$((count+1))
- fi
- done
-}
-
# Check if collabora is already installed
if ! does_this_docker_exist 'onlyoffice/documentserver'
then
@@ -86,28 +26,7 @@ else
# Ask for removal or reinstallation
reinstall_remove_menu "$SCRIPT_NAME"
# Removal
- # Check if Collabora is previously installed
- # If yes, then stop and prune the docker container
- docker_prune_this 'onlyoffice/documentserver'
- # Revoke LE
- SUBDOMAIN=$(input_box_flow "Please enter the subdomain you are using for OnlyOffice, e.g: office.yourdomain.com")
- 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"
- done
- fi
- # Remove Apache2 config
- if [ -f "$SITES_AVAILABLE/$SUBDOMAIN.conf" ]
- then
- a2dissite "$SUBDOMAIN".conf
- restart_webserver
- rm -f "$SITES_AVAILABLE/$SUBDOMAIN.conf"
- fi
- # Remove trusted domain
- remove_from_trusted_domains "$SUBDOMAIN"
+ remove_onlyoffice_docker
# Show successful uninstall if applicable
removal_popup "$SCRIPT_NAME"
fi
@@ -115,28 +34,8 @@ 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=$(input_box_flow "Please enter the subdomain you are using for Collabora, e.g: office.yourdomain.com")
- 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"
- done
- fi
- # Remove Apache2 config
- if [ -f "$SITES_AVAILABLE/$SUBDOMAIN.conf" ]
- then
- a2dissite "$SUBDOMAIN".conf
- restart_webserver
- rm -f "$SITES_AVAILABLE/$SUBDOMAIN.conf"
- fi
- # Remove trusted domain
- remove_from_trusted_domains "$SUBDOMAIN"
+ # Removal
+ remove_collabora_docker
fi
# Remove all office apps
diff --git a/apps/onlyoffice_integrated.sh b/apps/onlyoffice_integrated.sh
index 541ac006..2a42c788 100644
--- a/apps/onlyoffice_integrated.sh
+++ b/apps/onlyoffice_integrated.sh
@@ -20,48 +20,6 @@ debug_mode
# Check if root
root_check
-# TODO: remove all functions with NC21.0.3 release
-remove_all_office_apps() {
- # remove OnlyOffice-documentserver if installed
- if is_app_installed documentserver_community
- then
- nextcloud_occ app:remove documentserver_community
- fi
-
- # Disable OnlyOffice App if installed
- if is_app_installed onlyoffice
- then
- nextcloud_occ app:remove onlyoffice
- fi
-
- # remove richdocumentscode-documentserver if installed
- if is_app_installed richdocumentscode
- then
- nextcloud_occ app:remove richdocumentscode
- fi
-
- # Disable RichDocuments (Collabora App) if installed
- if is_app_installed richdocuments
- then
- nextcloud_occ app:remove richdocuments
- fi
-}
-remove_from_trusted_domains() {
- local element="$1"
- local count=0
- print_text_in_color "$ICyan" "Removing $element from trusted domains..."
- while [ "$count" -lt 10 ]
- do
- if [ "$(nextcloud_occ_no_check config:system:get trusted_domains "$count")" = "$element" ]
- then
- nextcloud_occ_no_check config:system:delete trusted_domains "$count"
- break
- else
- count=$((count+1))
- fi
- done
-}
-
# Check if Collabora is installed using the new method
if ! is_app_installed documentserver_community
then
@@ -84,61 +42,15 @@ 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=$(input_box_flow "Please enter the subdomain you are using for Collabora, e.g: office.yourdomain.com")
- 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"
- done
- fi
- # Remove Apache2 config
- if [ -f "$SITES_AVAILABLE/$SUBDOMAIN.conf" ]
- then
- a2dissite "$SUBDOMAIN".conf
- restart_webserver
- rm -f "$SITES_AVAILABLE/$SUBDOMAIN.conf"
- fi
- # Disable Collabora App if activated
- if is_app_installed richdocuments
- then
- nextcloud_occ app:remove richdocuments
- fi
- # Remove trusted domain
- remove_from_trusted_domains "$SUBDOMAIN"
+ # Removal
+ remove_collabora_docker
fi
# Check if Onlyoffice is installed and remove every trace of it
if does_this_docker_exist 'onlyoffice/documentserver'
then
- msg_box "You can't run both Collabora and OnlyOffice on the same VM. We will now remove Onlyoffice from the server."
- # Remove docker image
- docker_prune_this 'onlyoffice/documentserver'
- # Revoke LE
- SUBDOMAIN=$(input_box_flow "Please enter the subdomain you are using for Onlyoffice, e.g: office.yourdomain.com")
- 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"
- done
- fi
- # Remove Apache2 config
- if [ -f "$SITES_AVAILABLE/$SUBDOMAIN.conf" ]
- then
- a2dissite "$SUBDOMAIN".conf
- restart_webserver
- rm -f "$SITES_AVAILABLE/$SUBDOMAIN.conf"
- fi
- # Remove trusted domain
- remove_from_trusted_domains "$SUBDOMAIN"
+ # Removal
+ remove_onlyoffice_docker
fi
# Remove all office apps
diff --git a/apps/pico_cms.sh b/apps/pico_cms.sh
index 3dc8f95a..81c47023 100644
--- a/apps/pico_cms.sh
+++ b/apps/pico_cms.sh
@@ -18,41 +18,6 @@ debug_mode
# Check if root
root_check
-# TODO: remove both functions with NC21.0.3 release
-add_to_trusted_domains() {
- local element="$1"
- local count=0
- print_text_in_color "$ICyan" "Adding $element to trusted domains..."
- while [ "$count" -le 10 ]
- do
- if [ "$(nextcloud_occ_no_check config:system:get trusted_domains "$count")" = "$element" ]
- then
- break
- elif [ -z "$(nextcloud_occ_no_check config:system:get trusted_domains "$count")" ]
- then
- nextcloud_occ_no_check config:system:set trusted_domains "$count" --value="$element"
- break
- else
- count=$((count+1))
- fi
- done
-}
-remove_from_trusted_domains() {
- local element="$1"
- local count=0
- print_text_in_color "$ICyan" "Removing $element from trusted domains..."
- while [ "$count" -lt 10 ]
- do
- if [ "$(nextcloud_occ_no_check config:system:get trusted_domains "$count")" = "$element" ]
- then
- nextcloud_occ_no_check config:system:delete trusted_domains "$count"
- break
- else
- count=$((count+1))
- fi
- done
-}
-
# Nextcloud Main Domain
NCDOMAIN=$(nextcloud_occ_no_check config:system:get overwrite.cli.url | sed 's|https://||;s|/||')
diff --git a/lib.sh b/lib.sh
index ee53672b..7d388c82 100644
--- a/lib.sh
+++ b/lib.sh
@@ -1460,6 +1460,66 @@ else
fi
}
+remove_collabora_docker() {
+ # Check if Collabora is previously installed
+ # If yes, then stop and prune the docker container
+ docker_prune_this 'collabora/code'
+ # 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" ]
+ 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"
+ done
+ fi
+ # Remove Apache2 config
+ if [ -f "$SITES_AVAILABLE/$SUBDOMAIN.conf" ]
+ then
+ a2dissite "$SUBDOMAIN".conf
+ restart_webserver
+ rm -f "$SITES_AVAILABLE/$SUBDOMAIN.conf"
+ fi
+ # Disable RichDocuments (Collabora App) if activated
+ if is_app_installed richdocuments
+ then
+ nextcloud_occ app:remove richdocuments
+ fi
+ # Remove trusted domain
+ remove_from_trusted_domains "$SUBDOMAIN"
+}
+
+remove_onlyoffice_docker() {
+ # Check if Onlyoffice is previously installed
+ # If yes, then stop and prune the docker container
+ docker_prune_this 'onlyoffice/documentserver'
+ # Revoke LE
+ SUBDOMAIN=$(input_box_flow "Please enter the subdomain you are using for OnlyOffice, e.g: office.yourdomain.com")
+ 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"
+ done
+ fi
+ # Remove Apache2 config
+ if [ -f "$SITES_AVAILABLE/$SUBDOMAIN.conf" ]
+ then
+ a2dissite "$SUBDOMAIN".conf
+ restart_webserver
+ rm -f "$SITES_AVAILABLE/$SUBDOMAIN.conf"
+ fi
+ # Disable onlyoffice if activated
+ if is_app_installed onlyoffice
+ then
+ nextcloud_occ app:remove onlyoffice
+ fi
+ # Remove trusted domain
+ remove_from_trusted_domains "$SUBDOMAIN"
+}
+
# Remove all office apps
remove_all_office_apps() {
# remove OnlyOffice-documentserver if installed
diff --git a/nextcloud-startup-script.sh b/nextcloud-startup-script.sh
index ed7fd1f4..3b4ab10b 100644
--- a/nextcloud-startup-script.sh
+++ b/nextcloud-startup-script.sh
@@ -161,22 +161,18 @@ nc_update
DEBUG=0
debug_mode
-# Nextcloud 20 is required until 21.0.3 is out. Then NC 21 will be required.
-lowest_compatible_nc 20
+# Nextcloud 21 is required
+lowest_compatible_nc 21
# Import if missing and export again to import it with UUID
zpool_import_if_missing
-# Set phone region
-if [ "${CURRENTVERSION%%.*}" -ge "21" ]
+# Set phone region (needs the latest KEYBOARD_LAYOUT from lib)
+# shellcheck source=lib.sh
+source /var/scripts/fetch_lib.sh
+if [ -n "$KEYBOARD_LAYOUT" ]
then
- # Set phone region (needs the latest KEYBOARD_LAYOUT from lib)
- # shellcheck source=lib.sh
- source /var/scripts/fetch_lib.sh
- if [ -n "$KEYBOARD_LAYOUT" ]
- then
- nextcloud_occ config:system:set default_phone_region --value="$KEYBOARD_LAYOUT"
- fi
+ nextcloud_occ config:system:set default_phone_region --value="$KEYBOARD_LAYOUT"
fi
# Is this run as a pure root user?