From cddd8f3c22cc76ff632662428985307cd3bc7876 Mon Sep 17 00:00:00 2001
From: Bob Mottram <bob@freedombone.net>
Date: Mon, 8 May 2017 11:27:14 +0100
Subject: [PATCH] Reintroduce nextcloud on the stable 11 branch

---
 src/freedombone-app-nextcloud | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/src/freedombone-app-nextcloud b/src/freedombone-app-nextcloud
index 0920f58a5..84a29aa75 100755
--- a/src/freedombone-app-nextcloud
+++ b/src/freedombone-app-nextcloud
@@ -30,16 +30,17 @@
 # You should have received a copy of the GNU Affero General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-VARIANTS=''
+VARIANTS='full full-vim cloud'
 
 IN_DEFAULT_INSTALL=0
-SHOW_ON_ABOUT=0
+SHOW_ON_ABOUT=1
 
 NEXTCLOUD_DOMAIN_NAME=
 NEXTCLOUD_CODE=
 NEXTCLOUD_ONION_PORT=8112
 NEXTCLOUD_REPO="https://github.com/nextcloud/server"
-NEXTCLOUD_COMMIT='562c45d925a27b21f694a091029d87158364970c'
+# Stable 11 branch
+NEXTCLOUD_COMMIT='4fe02f6e3a812551661a3a7a7ceb4e1f3791cbd3'
 NEXTCLOUD_ADMIN_PASSWORD=
 
 nextcloud_variables=(ONION_ONLY
@@ -455,6 +456,13 @@ function install_nextcloud_main {
     function_check create_site_certificate
     create_site_certificate $NEXTCLOUD_DOMAIN_NAME 'yes'
 
+    if [[ $ONION_ONLY == "no" ]]; then
+        if [ ! -f /etc/ssl/certs/${NEXTCLOUD_DOMAIN_NAME}.pem ]; then
+            echo $'Certificate not generated for nextcloud'
+            exit 725762
+        fi
+    fi
+
     # Ensure that the database gets backed up locally, if remote
     # backups are not being used
     function_check backup_databases_script_header
-- 
GitLab