summaryrefslogtreecommitdiffstats
path: root/pykolab
diff options
context:
space:
mode:
authorAleksander Machniak <machniak@kolabsys.com>2019-05-07 10:53:45 +0200
committerAleksander Machniak <machniak@kolabsys.com>2019-05-07 10:53:45 +0200
commit8b48619c048200df24ee51feb29b555b0336e146 (patch)
treee935829174d29aa63632edcb064d4049587089b1 /pykolab
parent23e2c4637f55514e5aa3e687df28e355b0f00488 (diff)
downloadpykolab-8b48619c048200df24ee51feb29b555b0336e146.tar.gz
Fix enabling dirsrv service on Ubuntu (Bifrost#T200782)
Use the same `systemctl command dirsrv@host` syntax on all platforms with systemctl.
Diffstat (limited to 'pykolab')
-rw-r--r--pykolab/setup/setup_ldap.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pykolab/setup/setup_ldap.py b/pykolab/setup/setup_ldap.py
index 41ae549..1449a59 100644
--- a/pykolab/setup/setup_ldap.py
+++ b/pykolab/setup/setup_ldap.py
@@ -417,7 +417,7 @@ ServerAdminPwd = %(admin_pass)s
schema_error = True
if os.path.isfile('/bin/systemctl'):
- subprocess.call(['/bin/systemctl', 'restart', 'dirsrv.target'])
+ subprocess.call(['/bin/systemctl', 'restart', 'dirsrv@' + _input['hostname']])
time.sleep(20)
elif os.path.isfile('/sbin/service'):
subprocess.call(['/sbin/service', 'dirsrv', 'restart'])
@@ -429,7 +429,7 @@ ServerAdminPwd = %(admin_pass)s
log.error(_("Could not start the directory server service."))
if os.path.isfile('/bin/systemctl'):
- subprocess.call(['/bin/systemctl', 'enable', 'dirsrv.target'])
+ subprocess.call(['/bin/systemctl', 'enable', 'dirsrv@' + _input['hostname']])
elif os.path.isfile('/sbin/chkconfig'):
subprocess.call(['/sbin/chkconfig', 'dirsrv', 'on'])
elif os.path.isfile('/usr/sbin/update-rc.d'):