Restart slapd in all case in migration

This commit is contained in:
Josué Tille 2019-05-10 22:38:56 +02:00
parent fd76f5544a
commit 6674c9d59d
No known key found for this signature in database
GPG key ID: D5E068C6DFA8681D

View file

@ -99,9 +99,10 @@ class MyMigration(Migration):
os.system("cp -r --preserve /etc/ldap %s/ldap_config" % backup_folder)
os.system("cp -r --preserve /var/lib/ldap %s/ldap_db" % backup_folder)
os.system("cp -r --preserve /etc/yunohost/apps %s/apps_settings" % backup_folder)
os.system("systemctl start slapd")
except Exception as e:
raise YunohostError("migration_0009_can_not_backup_before_migration", error=e)
finally:
os.system("systemctl start slapd")
try:
# Update LDAP schema restart slapd