From 9850ae5420b1a090c27e15c922fdc8dfd4b1f18c Mon Sep 17 00:00:00 2001 From: KiekerJan Date: Mon, 6 Dec 2021 23:22:11 +0100 Subject: [PATCH 1/4] upgrade nextcloud to 21 --- setup/nextcloud.sh | 53 ++++++++++++++++++++++++---------------------- setup/web.sh | 4 ++++ 2 files changed, 32 insertions(+), 25 deletions(-) diff --git a/setup/nextcloud.sh b/setup/nextcloud.sh index e646d690..05cb7efc 100755 --- a/setup/nextcloud.sh +++ b/setup/nextcloud.sh @@ -100,8 +100,8 @@ InstallNextcloud() { } # Nextcloud Version to install. Checks are done down below to step through intermediate versions. -nextcloud_ver=20.0.14 -nextcloud_hash=92cac708915f51ee2afc1787fd845476fd090c81 +nextcloud_ver=21.0.7 +nextcloud_hash=f5c7079c5b56ce1e301c6a27c0d975d608bb01c9 contacts_ver=4.0.0 contacts_hash=f893ca57a543b260c9feeecbb5958c00b6998e18 calendar_ver=2.2.2 @@ -167,28 +167,33 @@ if [ ! -d /usr/local/lib/owncloud/ ] || [[ ! ${CURRENT_NEXTCLOUD_VER} =~ ^$nextc CURRENT_NEXTCLOUD_VER="15.0.8" fi if [[ ${CURRENT_NEXTCLOUD_VER} =~ ^15 ]]; then - InstallNextcloud 16.0.6 0bb3098455ec89f5af77a652aad553ad40a88819 3.3.0 e55d0357c6785d3b1f3b5f21780cb6d41d32443a 2.0.3 9d9717b29337613b72c74e9914c69b74b346c466 0.7.0 555a94811daaf5bdd336c5e48a78aa8567b86437 - CURRENT_NEXTCLOUD_VER="16.0.6" - fi - if [[ ${CURRENT_NEXTCLOUD_VER} =~ ^16 ]]; then - InstallNextcloud 17.0.6 50b98d2c2f18510b9530e558ced9ab51eb4f11b0 3.3.0 e55d0357c6785d3b1f3b5f21780cb6d41d32443a 2.0.3 9d9717b29337613b72c74e9914c69b74b346c466 0.7.0 555a94811daaf5bdd336c5e48a78aa8567b86437 - CURRENT_NEXTCLOUD_VER="17.0.6" - fi - if [[ ${CURRENT_NEXTCLOUD_VER} =~ ^17 ]]; then + InstallNextcloud 16.0.6 0bb3098455ec89f5af77a652aad553ad40a88819 3.3.0 e55d0357c6785d3b1f3b5f21780cb6d41d32443a 2.0.3 9d9717b29337613b72c74e9914c69b74b346c466 0.7.0 555a94811daaf5bdd336c5e48a78aa8567b86437 + CURRENT_NEXTCLOUD_VER="16.0.6" + fi + if [[ ${CURRENT_NEXTCLOUD_VER} =~ ^16 ]]; then + InstallNextcloud 17.0.6 50b98d2c2f18510b9530e558ced9ab51eb4f11b0 3.3.0 e55d0357c6785d3b1f3b5f21780cb6d41d32443a 2.0.3 9d9717b29337613b72c74e9914c69b74b346c466 0.7.0 555a94811daaf5bdd336c5e48a78aa8567b86437 + CURRENT_NEXTCLOUD_VER="17.0.6" + fi + if [[ ${CURRENT_NEXTCLOUD_VER} =~ ^17 ]]; then echo "ALTER TABLE oc_flow_operations ADD COLUMN entity VARCHAR;" | sqlite3 $STORAGE_ROOT/owncloud/owncloud.db - InstallNextcloud 18.0.10 39c0021a8b8477c3f1733fddefacfa5ebf921c68 3.4.1 aee680a75e95f26d9285efd3c1e25cf7f3bfd27e 2.0.3 9d9717b29337613b72c74e9914c69b74b346c466 1.0.0 3bf2609061d7214e7f0f69dd8883e55c4ec8f50a - CURRENT_NEXTCLOUD_VER="18.0.10" - fi - if [[ ${CURRENT_NEXTCLOUD_VER} =~ ^18 ]]; then - InstallNextcloud 19.0.4 01e98791ba12f4860d3d4047b9803f97a1b55c60 3.4.1 aee680a75e95f26d9285efd3c1e25cf7f3bfd27e 2.0.3 9d9717b29337613b72c74e9914c69b74b346c466 1.0.0 3bf2609061d7214e7f0f69dd8883e55c4ec8f50a - CURRENT_NEXTCLOUD_VER="19.0.4" - fi + InstallNextcloud 18.0.10 39c0021a8b8477c3f1733fddefacfa5ebf921c68 3.4.1 aee680a75e95f26d9285efd3c1e25cf7f3bfd27e 2.0.3 9d9717b29337613b72c74e9914c69b74b346c466 1.0.0 3bf2609061d7214e7f0f69dd8883e55c4ec8f50a + CURRENT_NEXTCLOUD_VER="18.0.10" + fi + if [[ ${CURRENT_NEXTCLOUD_VER} =~ ^18 ]]; then + InstallNextcloud 19.0.4 01e98791ba12f4860d3d4047b9803f97a1b55c60 3.4.1 aee680a75e95f26d9285efd3c1e25cf7f3bfd27e 2.0.3 9d9717b29337613b72c74e9914c69b74b346c466 1.0.0 3bf2609061d7214e7f0f69dd8883e55c4ec8f50a + CURRENT_NEXTCLOUD_VER="19.0.4" + fi + if [[ ${CURRENT_NEXTCLOUD_VER} =~ ^19 ]]; then + InstallNextcloud 19.0.4 01e98791ba12f4860d3d4047b9803f97a1b55c60 3.4.1 aee680a75e95f26d9285efd3c1e25cf7f3bfd27e 2.0.3 9d9717b29337613b72c74e9914c69b74b346c466 1.0.0 3bf2609061d7214e7f0f69dd8883e55c4ec8f50a + InstallNextcloud 20.0.14 92cac708915f51ee2afc1787fd845476fd090c81 4.0.0 f893ca57a543b260c9feeecbb5958c00b6998e18 2.2.2 923846d48afb5004a456b9079cf4b46d23b3ef3a 1.0.0 3bf2609061d7214e7f0f69dd8883e55c4ec8f50a + CURRENT_NEXTCLOUD_VER="20.0.14" + + # Nextcloud 20 needs to have some optional columns added + sudo -u www-data php /usr/local/lib/owncloud/occ db:add-missing-columns + fi fi InstallNextcloud $nextcloud_ver $nextcloud_hash $contacts_ver $contacts_hash $calendar_ver $calendar_hash $user_external_ver $user_external_hash - - # Nextcloud 20 needs to have some optional columns added - sudo -u www-data php /usr/local/lib/owncloud/occ db:add-missing-columns fi # ### Configuring Nextcloud @@ -359,11 +364,9 @@ tools/editconf.py /etc/php/$(php_version)/cli/conf.d/10-opcache.ini -c ';' \ opcache.save_comments=1 \ opcache.revalidate_freq=1 -# If apc is explicitly disabled we need to enable it -if grep -q apc.enabled=0 /etc/php/$(php_version)/mods-available/apcu.ini; then - tools/editconf.py /etc/php/$(php_version)/mods-available/apcu.ini -c ';' \ - apc.enabled=1 -fi +# Enable apc is required before installing nextcloud 21 +tools/editconf.py /etc/php/$(php_version)/mods-available/apcu.ini -c ';' \ + apc.enabled=1 # Set up a cron job for Nextcloud. cat > /etc/cron.d/mailinabox-nextcloud << EOF; diff --git a/setup/web.sh b/setup/web.sh index 12133fe2..b2cbaf6b 100755 --- a/setup/web.sh +++ b/setup/web.sh @@ -63,6 +63,10 @@ tools/editconf.py /etc/php/$(php_version)/fpm/php.ini -c ';' \ tools/editconf.py /etc/php/$(php_version)/fpm/pool.d/www.conf -c ';' \ env[PATH]=/usr/local/bin:/usr/bin:/bin \ +# Enable apc is required before installing nextcloud 21 +tools/editconf.py /etc/php/$(php_version)/mods-available/apcu.ini -c ';' \ + apc.enabled=1 + # Configure php-fpm based on the amount of memory the machine has # This is based on the nextcloud manual for performance tuning: https://docs.nextcloud.com/server/17/admin_manual/installation/server_tuning.html # Some synchronisation issues can occur when many people access the site at once. From fa9bcbe8d20a5968d5acc17b674e714fa4fdd2f3 Mon Sep 17 00:00:00 2001 From: KiekerJan Date: Mon, 6 Dec 2021 23:25:31 +0100 Subject: [PATCH 2/4] move command to web.sh setup --- setup/nextcloud.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/setup/nextcloud.sh b/setup/nextcloud.sh index 05cb7efc..2612497a 100755 --- a/setup/nextcloud.sh +++ b/setup/nextcloud.sh @@ -364,10 +364,6 @@ tools/editconf.py /etc/php/$(php_version)/cli/conf.d/10-opcache.ini -c ';' \ opcache.save_comments=1 \ opcache.revalidate_freq=1 -# Enable apc is required before installing nextcloud 21 -tools/editconf.py /etc/php/$(php_version)/mods-available/apcu.ini -c ';' \ - apc.enabled=1 - # Set up a cron job for Nextcloud. cat > /etc/cron.d/mailinabox-nextcloud << EOF; #!/bin/bash From 507ac86999bb9ecbc2466c4f7ff4736db180b485 Mon Sep 17 00:00:00 2001 From: KiekerJan Date: Mon, 6 Dec 2021 23:32:24 +0100 Subject: [PATCH 3/4] updated readme --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a3847729..7a847453 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,8 @@ Functionality changes and additions * Configure domain names for which only www will be hosted Edit /etc/miabwwwdomains.conf to configure. The box will handle incoming traffic asking for these domain names. The DNS entries are entered in an external DNS provider! If you want this box to handle the DNS entries, simply add a mail alias. (existing functionality of the vanilla Mail-in-a-Box) * Add some munin plugins -* Update nextcloud to 20.0.13 +* Update nextcloud to 21.0.7 + And updated apps * Add nextcloud notes app * Update roundcube carddav plugin to 4.1.1 * Add roundcube context menu plugin From 19be77176928c9778f61238f0af887dc4359941e Mon Sep 17 00:00:00 2001 From: KiekerJan Date: Tue, 7 Dec 2021 22:41:00 +0100 Subject: [PATCH 4/4] upgraded nextcloud to 22 --- README.md | 2 +- setup/nextcloud.sh | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 7a847453..802e503c 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Functionality changes and additions * Configure domain names for which only www will be hosted Edit /etc/miabwwwdomains.conf to configure. The box will handle incoming traffic asking for these domain names. The DNS entries are entered in an external DNS provider! If you want this box to handle the DNS entries, simply add a mail alias. (existing functionality of the vanilla Mail-in-a-Box) * Add some munin plugins -* Update nextcloud to 21.0.7 +* Update nextcloud to 22.2.3 And updated apps * Add nextcloud notes app * Update roundcube carddav plugin to 4.1.1 diff --git a/setup/nextcloud.sh b/setup/nextcloud.sh index 2612497a..a7503495 100755 --- a/setup/nextcloud.sh +++ b/setup/nextcloud.sh @@ -100,8 +100,8 @@ InstallNextcloud() { } # Nextcloud Version to install. Checks are done down below to step through intermediate versions. -nextcloud_ver=21.0.7 -nextcloud_hash=f5c7079c5b56ce1e301c6a27c0d975d608bb01c9 +nextcloud_ver=22.2.3 +nextcloud_hash=58d2d897ba22a057aa03d29c762c5306211fefd2 contacts_ver=4.0.0 contacts_hash=f893ca57a543b260c9feeecbb5958c00b6998e18 calendar_ver=2.2.2 @@ -184,13 +184,16 @@ if [ ! -d /usr/local/lib/owncloud/ ] || [[ ! ${CURRENT_NEXTCLOUD_VER} =~ ^$nextc CURRENT_NEXTCLOUD_VER="19.0.4" fi if [[ ${CURRENT_NEXTCLOUD_VER} =~ ^19 ]]; then - InstallNextcloud 19.0.4 01e98791ba12f4860d3d4047b9803f97a1b55c60 3.4.1 aee680a75e95f26d9285efd3c1e25cf7f3bfd27e 2.0.3 9d9717b29337613b72c74e9914c69b74b346c466 1.0.0 3bf2609061d7214e7f0f69dd8883e55c4ec8f50a InstallNextcloud 20.0.14 92cac708915f51ee2afc1787fd845476fd090c81 4.0.0 f893ca57a543b260c9feeecbb5958c00b6998e18 2.2.2 923846d48afb5004a456b9079cf4b46d23b3ef3a 1.0.0 3bf2609061d7214e7f0f69dd8883e55c4ec8f50a CURRENT_NEXTCLOUD_VER="20.0.14" # Nextcloud 20 needs to have some optional columns added sudo -u www-data php /usr/local/lib/owncloud/occ db:add-missing-columns fi + if [[ ${CURRENT_NEXTCLOUD_VER} =~ ^20 ]]; then + InstallNextcloud 21.0.7 f5c7079c5b56ce1e301c6a27c0d975d608bb01c9 4.0.0 f893ca57a543b260c9feeecbb5958c00b6998e18 2.2.2 923846d48afb5004a456b9079cf4b46d23b3ef3a 1.0.0 3bf2609061d7214e7f0f69dd8883e55c4ec8f50a + CURRENT_NEXTCLOUD_VER="21.0.7" + fi fi InstallNextcloud $nextcloud_ver $nextcloud_hash $contacts_ver $contacts_hash $calendar_ver $calendar_hash $user_external_ver $user_external_hash