Skip to content

Commit

Permalink
Preparations for the next NC22.0.0 NcVM release (#1997)
Browse files Browse the repository at this point in the history
  • Loading branch information
szaimen authored Jul 9, 2021
1 parent 89e77e3 commit c262de4
Show file tree
Hide file tree
Showing 8 changed files with 121 additions and 436 deletions.
40 changes: 40 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
110 changes: 3 additions & 107 deletions apps/collabora_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand All @@ -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
Expand Down
91 changes: 4 additions & 87 deletions apps/collabora_integrated.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
Loading

0 comments on commit c262de4

Please sign in to comment.