Do not enable cron job if dovecot is disabled.
This commit is contained in:
@@ -5,7 +5,7 @@ PYTHON=%{venv_path}/bin/python
|
|||||||
INSTANCE=%{instance_path}
|
INSTANCE=%{instance_path}
|
||||||
|
|
||||||
# Operations on mailboxes
|
# Operations on mailboxes
|
||||||
* * * * * %{dovecot_mailboxes_owner} $PYTHON $INSTANCE/manage.py handle_mailbox_operations
|
%{dovecot_enabled}* * * * * %{dovecot_mailboxes_owner} $PYTHON $INSTANCE/manage.py handle_mailbox_operations
|
||||||
|
|
||||||
# Sessions table cleanup
|
# Sessions table cleanup
|
||||||
0 0 * * * root $PYTHON $INSTANCE/manage.py clearsessions
|
0 0 * * * root $PYTHON $INSTANCE/manage.py clearsessions
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ class Modoboa(base.Installer):
|
|||||||
if "modoboa-radicale" in self.extensions:
|
if "modoboa-radicale" in self.extensions:
|
||||||
if not self.config.getboolean("radicale", "enabled"):
|
if not self.config.getboolean("radicale", "enabled"):
|
||||||
self.extensions.remove("modoboa-radicale")
|
self.extensions.remove("modoboa-radicale")
|
||||||
|
self.dovecot_enabled = self.config.getboolean("dovecot", "enabled")
|
||||||
|
|
||||||
def is_extension_ok_for_version(self, extension, version):
|
def is_extension_ok_for_version(self, extension, version):
|
||||||
"""Check if extension can be installed with this modo version."""
|
"""Check if extension can be installed with this modo version."""
|
||||||
@@ -104,7 +105,9 @@ class Modoboa(base.Installer):
|
|||||||
packages += [
|
packages += [
|
||||||
"https://github.com/modoboa/caldav/tarball/master#egg=caldav"]
|
"https://github.com/modoboa/caldav/tarball/master#egg=caldav"]
|
||||||
python.install_packages(
|
python.install_packages(
|
||||||
packages, self.venv_path, upgrade=self.upgrade, sudo_user=self.user)
|
packages, self.venv_path, upgrade=self.upgrade,
|
||||||
|
sudo_user=self.user
|
||||||
|
)
|
||||||
if self.devmode:
|
if self.devmode:
|
||||||
# FIXME: use dev-requirements instead
|
# FIXME: use dev-requirements instead
|
||||||
python.install_packages(
|
python.install_packages(
|
||||||
|
|||||||
Reference in New Issue
Block a user