users: Handle upgrade for ldapscripts config

Increment users module version so existing users will get FreedomBox
copy of ldapscripts config file.

Avoid reconfiguration of slapd during module upgrade, because this
will move the existing database.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
James Valleroy authored and Sunil Mohan Adapa committed 2017-12-14 11:43:07 +05:30
1 parent 4cbb60ccfe
commit 87eecb7c62
2 files changed
+13 -4

No files matched your search

+3 -1
View File
@@ -25,7 +25,7 @@ from django.utils.translation import ugettext_lazy as _
from plinth import action_utils, actions
from plinth.menu import main_menu
version = 1
version = 2
is_essential = True
@@ -57,6 +57,8 @@ def init():
def setup(helper, old_version=None):
"""Install and configure the module."""
helper.install(managed_packages)
if old_version is None:
helper.call('post', actions.superuser_run, 'users', ['first-setup'])
helper.call('post', actions.superuser_run, 'users', ['setup'])