From 60e52d272953fb7754c800cf5ffe2022e3e3bad1 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Mon, 16 May 2016 21:05:05 +0530 Subject: [PATCH] Deal with ownCloud removal from Debian It has been decided that FreedomBox will no longer support ownCloud due it's removal from Debian. To deal with this: - Don't show ownCloud in Plinth any more for new users. - For users who have already installed ownCloud, show a warning message that they need to migrate away from ownCloud or need to manage it manually. --- plinth/modules/owncloud/__init__.py | 6 ++++++ plinth/modules/owncloud/templates/owncloud.html | 11 +++++++++++ 2 files changed, 17 insertions(+) diff --git a/plinth/modules/owncloud/__init__.py b/plinth/modules/owncloud/__init__.py index 836e22879..2c214a456 100644 --- a/plinth/modules/owncloud/__init__.py +++ b/plinth/modules/owncloud/__init__.py @@ -21,6 +21,7 @@ Plinth module to configure ownCloud from django.utils.translation import ugettext_lazy as _ from functools import partial +import os from plinth import actions from plinth import action_utils @@ -53,6 +54,11 @@ service = None def init(): """Initialize the ownCloud module""" + # XXX: ownCloud has been removed from Debian + if not os.path.isfile('/etc/owncloud/config.php') and \ + not os.path.isfile('/etc/owncloud/autoconfig.php'): + return + menu = cfg.main_menu.get('apps:index') menu.add_urlname(title, 'glyphicon-picture', 'owncloud:index', 700) diff --git a/plinth/modules/owncloud/templates/owncloud.html b/plinth/modules/owncloud/templates/owncloud.html index 6f53825d9..ee1979538 100644 --- a/plinth/modules/owncloud/templates/owncloud.html +++ b/plinth/modules/owncloud/templates/owncloud.html @@ -23,6 +23,17 @@ {% block configuration %} + + {% include "diagnostics_button.html" with module="owncloud" %}

{% trans "Configuration" %}