Branch 'pykolab-0.5' - 16 commits - configure.ac pykolab/setup
Paul Klos
klos at kolabsys.com
Wed Oct 24 18:10:35 CEST 2012
configure.ac | 4 +-
pykolab/setup/setup_freebusy.py | 15 +++++++--
pykolab/setup/setup_imap.py | 31 ++++++++++++++++---
pykolab/setup/setup_kolabd.py | 20 ++++++++++--
pykolab/setup/setup_ldap.py | 53 +++++++++++++++++++++++++--------
pykolab/setup/setup_mta.py | 62 +++++++++++++++++++++++++++++++--------
pykolab/setup/setup_mysql.py | 23 ++++++++++----
pykolab/setup/setup_roundcube.py | 34 ++++++++++++++-------
pykolab/setup/setup_syncroton.py | 15 +++++++--
pykolab/setup/setup_zpush.py | 17 ++++++++--
10 files changed, 211 insertions(+), 63 deletions(-)
New commits:
commit e0d4f5e1acaf86dd6fe7bd4599f3ee1faff71b6c
Author: Paul Klos <kolab at klos2day.nl>
Date: Wed Oct 24 09:18:41 2012 -0400
Release 0.5.6
diff --git a/configure.ac b/configure.ac
index 9d0d66b..425ae8f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
-AC_INIT([pykolab], 0.5.5)
-AC_SUBST([RELEASE], 2)
+AC_INIT([pykolab], 0.5.6)
+AC_SUBST([RELEASE], 1)
AC_CONFIG_SRCDIR(pykolab/constants.py.in)
commit 36b801c0a9deab721e63abcb35c9a60609e3a673
Author: Paul Klos <kolab at klos2day.nl>
Date: Wed Oct 24 09:14:42 2012 -0400
Corrected indentation
diff --git a/pykolab/setup/setup_ldap.py b/pykolab/setup/setup_ldap.py
index ee3db85..325cbcf 100644
--- a/pykolab/setup/setup_ldap.py
+++ b/pykolab/setup/setup_ldap.py
@@ -111,26 +111,26 @@ def execute(*args, **kw):
""")
)
- try:
- pw = pwd.getpwnam("dirsrv")
- except:
- _input['userid'] = utils.ask_question(_("User"), default="nobody")
- _input['group'] = utils.ask_question(_("Group"), default="nobody")
- else:
- _input['userid'] = utils.ask_question(_("User"), default="dirsrv")
- _input['group'] = utils.ask_question(_("Group"), default="dirsrv")
+ try:
+ pw = pwd.getpwnam("dirsrv")
+ except:
+ _input['userid'] = utils.ask_question(_("User"), default="nobody")
+ _input['group'] = utils.ask_question(_("Group"), default="nobody")
+ else:
+ _input['userid'] = utils.ask_question(_("User"), default="dirsrv")
+ _input['group'] = utils.ask_question(_("Group"), default="dirsrv")
else:
_input['admin_pass'] = conf.get('ldap', 'bind_pw')
_input['dirmgr_pass'] = conf.get('ldap', 'bind_pw')
try:
- pw = pwd.getpwnam("dirsrv")
- except:
- _input['userid'] = "nobody"
- _input['group'] = "nobody"
- else:
- _input['userid'] = "dirsrv"
- _input['group'] = "dirsrv"
+ pw = pwd.getpwnam("dirsrv")
+ except:
+ _input['userid'] = "nobody"
+ _input['group'] = "nobody"
+ else:
+ _input['userid'] = "dirsrv"
+ _input['group'] = "dirsrv"
# TODO: Verify the user and group exist.
diff --git a/pykolab/setup/setup_mta.py b/pykolab/setup/setup_mta.py
index fb3a2ad..862c789 100644
--- a/pykolab/setup/setup_mta.py
+++ b/pykolab/setup/setup_mta.py
@@ -211,10 +211,10 @@ result_attribute = mail
if not os.path.isfile('/etc/postfix/main.cf'):
if os.path.isfile('/usr/share/postfix/main.cf.debian'):
- shutil.copy(
- '/usr/share/postfix/main.cf.debian',
- '/etc/postfix/main.cf'
- )
+ shutil.copy(
+ '/usr/share/postfix/main.cf.debian',
+ '/etc/postfix/main.cf'
+ )
myaugeas = Augeas()
@@ -289,10 +289,10 @@ result_attribute = mail
fp.close()
t = Template(template_definition, searchList=[amavisd_settings])
- if os.path.isdir('/etc/amavisd'):
- fp = open('/etc/amavisd/amavisd.conf', 'w')
- elif os.path.isdir('/etc/amavis'):
- fp = open('/etc/amavis/amavisd.conf', 'w')
+ if os.path.isdir('/etc/amavisd'):
+ fp = open('/etc/amavisd/amavisd.conf', 'w')
+ elif os.path.isdir('/etc/amavis'):
+ fp = open('/etc/amavis/amavisd.conf', 'w')
fp.write(t.__str__())
fp.close()
@@ -306,19 +306,19 @@ result_attribute = mail
# while really it isn't required.
else:
log.info(_("Not writing out any configuration for Amavis."))
- # On debian wheezy amavisd-new expects '/etc/mailname' - possibly remediable through
- # the #1080 enhancement mentioned above, but here's a quick fix.
- f = open('/etc/mailname','w')
+ # On debian wheezy amavisd-new expects '/etc/mailname' - possibly remediable through
+ # the #1080 enhancement mentioned above, but here's a quick fix.
+ f = open('/etc/mailname','w')
f.writelines(conf.get('kolab', 'primary_domain'))
- f.close()
+ f.close()
if os.path.isfile('/etc/default/spamassassin'):
- myaugeas = Augeas()
- setting = os.path.join('/files/etc/default/spamassassin','ENABLED')
- if not myaugeas.get(setting) == '1':
- myaugeas.set(setting,'1')
- myaugeas.save()
- myaugeas.close()
+ myaugeas = Augeas()
+ setting = os.path.join('/files/etc/default/spamassassin','ENABLED')
+ if not myaugeas.get(setting) == '1':
+ myaugeas.set(setting,'1')
+ myaugeas.save()
+ myaugeas.close()
if os.path.isfile('/bin/systemctl'):
subprocess.call(['systemctl', 'restart', 'postfix.service'])
diff --git a/pykolab/setup/setup_roundcube.py b/pykolab/setup/setup_roundcube.py
index 7810393..19ebd01 100644
--- a/pykolab/setup/setup_roundcube.py
+++ b/pykolab/setup/setup_roundcube.py
@@ -122,10 +122,10 @@ def execute(*args, **kw):
_("Successfully compiled template %r, writing out to %r") % (template_file, want_file),
level=8
)
- if os.path.isdir('/etc/roundcubemail'):
- fp = open('/etc/roundcubemail/%s' % (want_file), 'w')
- elif os.path.isdir('/etc/roundcube'):
- fp = open('/etc/roundcube/%s' % (want_file), 'w')
+ if os.path.isdir('/etc/roundcubemail'):
+ fp = open('/etc/roundcubemail/%s' % (want_file), 'w')
+ elif os.path.isdir('/etc/roundcube'):
+ fp = open('/etc/roundcube/%s' % (want_file), 'w')
fp.write(t.__str__())
fp.close()
@@ -143,9 +143,9 @@ def execute(*args, **kw):
schema_files.append(schema_filepath)
if os.path.isdir('/usr/share/roundcubemail'):
- rcpath = '/usr/share/roundcubemail/'
+ rcpath = '/usr/share/roundcubemail/'
elif os.path.isdir('/usr/share/roundcube'):
- rcpath = '/usr/share/roundcube/'
+ rcpath = '/usr/share/roundcube/'
for root, directories, filenames in os.walk(rcpath + 'plugins/calendar/drivers/kolab/'):
for filename in filenames:
if filename.startswith('mysql') and filename.endswith('.sql'):
commit 4ef657abbb86deb765f3eaf49fcce73ea0425cc1
Author: Johannes Graumann <johannes_graumann at web.de>
Date: Mon Oct 15 23:19:36 2012 +0300
Debianize: Provide 'time' required by quick fix for current 389-ds bug prohibiting proper restart (see 46a7fbf2a15f347c5fd1d579a5980d87d1906010);
Bug reported upstream and fixed in 289-ds parent releases >= 1.2.11.15-1 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=689389 ;
(cherry picked from commit 98f26ff425ebd635b7262996e09d0e8d689974b6)
diff --git a/pykolab/setup/setup_ldap.py b/pykolab/setup/setup_ldap.py
index 59f69cf..ee3db85 100644
--- a/pykolab/setup/setup_ldap.py
+++ b/pykolab/setup/setup_ldap.py
@@ -24,6 +24,7 @@ import pwd
import shutil
import subprocess
import tempfile
+import time
import components
commit 00b2a137a4256ebbba872188305de39cc0abf743
Author: Johannes Graumann <johannes_graumann at web.de>
Date: Mon Oct 15 23:02:06 2012 +0300
Debianize: Check for existence of Debian-specific 'dirsrv' user and use for user/group default if present;
(cherry picked from commit 8624fe67b992c9a1f5d6e9b4c2f88eeaaafc67f0)
diff --git a/pykolab/setup/setup_ldap.py b/pykolab/setup/setup_ldap.py
index 2960c49..59f69cf 100644
--- a/pykolab/setup/setup_ldap.py
+++ b/pykolab/setup/setup_ldap.py
@@ -20,6 +20,7 @@
import ldap
import ldap.modlist
import os
+import pwd
import shutil
import subprocess
import tempfile
@@ -109,14 +110,26 @@ def execute(*args, **kw):
""")
)
- _input['userid'] = utils.ask_question(_("User"), default="nobody")
- _input['group'] = utils.ask_question(_("Group"), default="nobody")
+ try:
+ pw = pwd.getpwnam("dirsrv")
+ except:
+ _input['userid'] = utils.ask_question(_("User"), default="nobody")
+ _input['group'] = utils.ask_question(_("Group"), default="nobody")
+ else:
+ _input['userid'] = utils.ask_question(_("User"), default="dirsrv")
+ _input['group'] = utils.ask_question(_("Group"), default="dirsrv")
else:
_input['admin_pass'] = conf.get('ldap', 'bind_pw')
_input['dirmgr_pass'] = conf.get('ldap', 'bind_pw')
- _input['userid'] = "nobody"
- _input['group'] = "nobody"
+ try:
+ pw = pwd.getpwnam("dirsrv")
+ except:
+ _input['userid'] = "nobody"
+ _input['group'] = "nobody"
+ else:
+ _input['userid'] = "dirsrv"
+ _input['group'] = "dirsrv"
# TODO: Verify the user and group exist.
commit 89aada4795207c870da0b2cf9011d450685266f5
Author: Johannes Graumann <johannes_graumann at web.de>
Date: Mon Oct 15 22:41:34 2012 +0300
Debianize: Adapt to Debians use of roundcube rather than roundcubemail;
(cherry picked from commit 87a93c748fb5b1591a9e26e6cd377e22f54706d0)
diff --git a/pykolab/setup/setup_roundcube.py b/pykolab/setup/setup_roundcube.py
index 8361d8c..7810393 100644
--- a/pykolab/setup/setup_roundcube.py
+++ b/pykolab/setup/setup_roundcube.py
@@ -119,14 +119,13 @@ def execute(*args, **kw):
t = Template(template_definition, searchList=[rc_settings])
log.debug(
- _("Successfully compiled template %r, writing out to %r") % (
- template_file,
- '/etc/roundcubemail/%s' % (want_file)
- ),
+ _("Successfully compiled template %r, writing out to %r") % (template_file, want_file),
level=8
)
-
- fp = open('/etc/roundcubemail/%s' % (want_file), 'w')
+ if os.path.isdir('/etc/roundcubemail'):
+ fp = open('/etc/roundcubemail/%s' % (want_file), 'w')
+ elif os.path.isdir('/etc/roundcube'):
+ fp = open('/etc/roundcube/%s' % (want_file), 'w')
fp.write(t.__str__())
fp.close()
@@ -143,14 +142,18 @@ def execute(*args, **kw):
if not schema_filepath in schema_files:
schema_files.append(schema_filepath)
- for root, directories, filenames in os.walk('/usr/share/roundcubemail/plugins/calendar/drivers/kolab/'):
+ if os.path.isdir('/usr/share/roundcubemail'):
+ rcpath = '/usr/share/roundcubemail/'
+ elif os.path.isdir('/usr/share/roundcube'):
+ rcpath = '/usr/share/roundcube/'
+ for root, directories, filenames in os.walk(rcpath + 'plugins/calendar/drivers/kolab/'):
for filename in filenames:
if filename.startswith('mysql') and filename.endswith('.sql'):
schema_filepath = os.path.join(root,filename)
if not schema_filepath in schema_files:
schema_files.append(schema_filepath)
- for root, directories, filenames in os.walk('/usr/share/roundcubemail/plugins/libkolab/'):
+ for root, directories, filenames in os.walk(rcpath + 'plugins/libkolab/'):
for filename in filenames:
if filename.startswith('mysql') and filename.endswith('.sql'):
schema_filepath = os.path.join(root,filename)
commit a84b5045a4f7513fcd3931108d1a8fdf435db48d
Author: Johannes Graumann <johannes_graumann at web.de>
Date: Mon Oct 15 22:37:55 2012 +0300
Clarify otherwise redundant warning message;
(cherry picked from commit 9f4d66dfe7a0eb9e059433372d3b3b8ebfc55155)
diff --git a/pykolab/setup/setup_mysql.py b/pykolab/setup/setup_mysql.py
index 975c2fe..c956eeb 100644
--- a/pykolab/setup/setup_mysql.py
+++ b/pykolab/setup/setup_mysql.py
@@ -135,5 +135,5 @@ password='%s'
conf.command_set('kolab_wap', 'sql_uri', 'mysql://kolab:%s@localhost/kolab' % (mysql_kolab_password))
else:
- log.warning(_("Could not find the Kolab schema file"))
+ log.warning(_("Could not find the MySQL Kolab schema file"))
commit 69de7c43102e07f0d8e7cb81668eea93e9860e48
Author: Johannes Graumann <johannes_graumann at web.de>
Date: Mon Oct 15 22:36:41 2012 +0300
Debianize: Edit /etc/default/spamassassin to allow for init script mediated startup;
(cherry picked from commit a2486764ecca3a6203d2ba6dfabeff66c95a9e58)
diff --git a/pykolab/setup/setup_mta.py b/pykolab/setup/setup_mta.py
index 6f0c102..fb3a2ad 100644
--- a/pykolab/setup/setup_mta.py
+++ b/pykolab/setup/setup_mta.py
@@ -312,6 +312,14 @@ result_attribute = mail
f.writelines(conf.get('kolab', 'primary_domain'))
f.close()
+ if os.path.isfile('/etc/default/spamassassin'):
+ myaugeas = Augeas()
+ setting = os.path.join('/files/etc/default/spamassassin','ENABLED')
+ if not myaugeas.get(setting) == '1':
+ myaugeas.set(setting,'1')
+ myaugeas.save()
+ myaugeas.close()
+
if os.path.isfile('/bin/systemctl'):
subprocess.call(['systemctl', 'restart', 'postfix.service'])
subprocess.call(['systemctl', 'restart', 'amavisd.service'])
commit fd18fa9adb754db6178bda26e48ccea31375de2d
Author: Johannes Graumann <johannes_graumann at web.de>
Date: Mon Oct 15 22:35:45 2012 +0300
Debianize: Provide amavisd-requested /etc/mailname - possibly remediable through enhancement filed as #1080?
(cherry picked from commit a01d23ee133c90565f7ef0a49f41970ccc7efa75)
diff --git a/pykolab/setup/setup_mta.py b/pykolab/setup/setup_mta.py
index 26885eb..6f0c102 100644
--- a/pykolab/setup/setup_mta.py
+++ b/pykolab/setup/setup_mta.py
@@ -306,6 +306,11 @@ result_attribute = mail
# while really it isn't required.
else:
log.info(_("Not writing out any configuration for Amavis."))
+ # On debian wheezy amavisd-new expects '/etc/mailname' - possibly remediable through
+ # the #1080 enhancement mentioned above, but here's a quick fix.
+ f = open('/etc/mailname','w')
+ f.writelines(conf.get('kolab', 'primary_domain'))
+ f.close()
if os.path.isfile('/bin/systemctl'):
subprocess.call(['systemctl', 'restart', 'postfix.service'])
commit c3ea31c955a924b89f3a4e2abbdad5233dafbd71
Author: Johannes Graumann <johannes_graumann at web.de>
Date: Mon Oct 15 22:34:14 2012 +0300
Debianize: Conditionally adapt amavisd configuration path;
(cherry picked from commit 728ca8f9910761474ec7ad4fedd6e5793040596c)
diff --git a/pykolab/setup/setup_mta.py b/pykolab/setup/setup_mta.py
index bc250a8..26885eb 100644
--- a/pykolab/setup/setup_mta.py
+++ b/pykolab/setup/setup_mta.py
@@ -289,7 +289,10 @@ result_attribute = mail
fp.close()
t = Template(template_definition, searchList=[amavisd_settings])
- fp = open('/etc/amavisd/amavisd.conf', 'w')
+ if os.path.isdir('/etc/amavisd'):
+ fp = open('/etc/amavisd/amavisd.conf', 'w')
+ elif os.path.isdir('/etc/amavis'):
+ fp = open('/etc/amavis/amavisd.conf', 'w')
fp.write(t.__str__())
fp.close()
commit 0d0c09ab361d6712a2fc43ee9c487dbad6a98865
Author: Paul Klos <kolab at klos2day.nl>
Date: Wed Oct 24 07:31:06 2012 -0400
Corrected indentation
diff --git a/pykolab/setup/setup_ldap.py b/pykolab/setup/setup_ldap.py
index c173be4..2960c49 100644
--- a/pykolab/setup/setup_ldap.py
+++ b/pykolab/setup/setup_ldap.py
@@ -223,14 +223,12 @@ ServerAdminPwd = %(admin_pass)s
os.close(fp)
if os.path.isfile("/usr/sbin/setup-ds-admin.pl"):
- setup_ds_admin = "/usr/sbin/setup-ds-admin.pl"
-# elif os.path.isfile("/usr/sbin/setup-ds-admin"):
-# setup_ds_admin = "/usr/sbin/setup-ds-admin"
+ setup_ds_admin = "/usr/sbin/setup-ds-admin.pl"
elif os.path.isfile("/usr/sbin/setup-ds"):
- setup_ds_admin = "/usr/sbin/setup-ds"
+ setup_ds_admin = "/usr/sbin/setup-ds"
else:
- log.error(_("No directory server setup tool available."))
-
+ log.error(_("No directory server setup tool available."))
+
command = [
setup_ds_admin,
'--debug',
diff --git a/pykolab/setup/setup_mta.py b/pykolab/setup/setup_mta.py
index bb37d27..bc250a8 100644
--- a/pykolab/setup/setup_mta.py
+++ b/pykolab/setup/setup_mta.py
@@ -210,12 +210,12 @@ result_attribute = mail
}
if not os.path.isfile('/etc/postfix/main.cf'):
- if os.path.isfile('/usr/share/postfix/main.cf.debian'):
- shutil.copy(
- '/usr/share/postfix/main.cf.debian',
- '/etc/postfix/main.cf'
- )
-
+ if os.path.isfile('/usr/share/postfix/main.cf.debian'):
+ shutil.copy(
+ '/usr/share/postfix/main.cf.debian',
+ '/etc/postfix/main.cf'
+ )
+
myaugeas = Augeas()
setting_base = '/files/etc/postfix/main.cf/'
commit 97fe39d0bf4bc0ce86a454d07ea7a4e58c2c4756
Author: Johannes Graumann <johannes_graumann at web.de>
Date: Mon Oct 15 22:33:09 2012 +0300
Debianize: Provide main.cf from Debian's example file if user choose not to debconf-configure postfix during installation;
diff --git a/pykolab/setup/setup_mta.py b/pykolab/setup/setup_mta.py
index d91a3a7..bb37d27 100644
--- a/pykolab/setup/setup_mta.py
+++ b/pykolab/setup/setup_mta.py
@@ -20,6 +20,7 @@
from augeas import Augeas
from Cheetah.Template import Template
import os
+import shutil
import subprocess
import components
@@ -208,6 +209,13 @@ result_attribute = mail
}
+ if not os.path.isfile('/etc/postfix/main.cf'):
+ if os.path.isfile('/usr/share/postfix/main.cf.debian'):
+ shutil.copy(
+ '/usr/share/postfix/main.cf.debian',
+ '/etc/postfix/main.cf'
+ )
+
myaugeas = Augeas()
setting_base = '/files/etc/postfix/main.cf/'
commit 6e49491cdfa359d79a076c9a74179c5b67612bb8
Author: Johannes Graumann <johannes_graumann at web.de>
Date: Mon Oct 15 22:29:10 2012 +0300
Debianize: Adapt setup-ds* paths;
diff --git a/pykolab/setup/setup_ldap.py b/pykolab/setup/setup_ldap.py
index b98c85a..c173be4 100644
--- a/pykolab/setup/setup_ldap.py
+++ b/pykolab/setup/setup_ldap.py
@@ -222,11 +222,15 @@ ServerAdminPwd = %(admin_pass)s
os.write(fp, data)
os.close(fp)
- setup_ds_admin = "/usr/sbin/setup-ds-admin.pl"
-
- if not os.path.isfile(setup_ds_admin):
- setup_ds_admin = "/usr/sbin/setup-ds-admin"
-
+ if os.path.isfile("/usr/sbin/setup-ds-admin.pl"):
+ setup_ds_admin = "/usr/sbin/setup-ds-admin.pl"
+# elif os.path.isfile("/usr/sbin/setup-ds-admin"):
+# setup_ds_admin = "/usr/sbin/setup-ds-admin"
+ elif os.path.isfile("/usr/sbin/setup-ds"):
+ setup_ds_admin = "/usr/sbin/setup-ds"
+ else:
+ log.error(_("No directory server setup tool available."))
+
command = [
setup_ds_admin,
'--debug',
commit 45841df53fcc3fafd98265f78068f9b1395853a2
Author: Johannes Graumann <johannes_graumann at web.de>
Date: Mon Oct 15 22:25:26 2012 +0300
Clarify otherwise redundant warning message;
diff --git a/pykolab/setup/setup_ldap.py b/pykolab/setup/setup_ldap.py
index 2fe2baf..b98c85a 100644
--- a/pykolab/setup/setup_ldap.py
+++ b/pykolab/setup/setup_ldap.py
@@ -281,7 +281,7 @@ ServerAdminPwd = %(admin_pass)s
)
)
else:
- log.warning(_("Could not find the Kolab schema file"))
+ log.warning(_("Could not find the ldap Kolab schema file"))
if os.path.isfile('/bin/systemctl'):
subprocess.call(['/bin/systemctl', 'restart', 'dirsrv.target'])
commit 2cbecd918f846ae7a22236c119c80ea695662d7a
Author: Paul Klos <kolab at klos2day.nl>
Date: Wed Oct 24 07:13:36 2012 -0400
Cherry-picked commits
6c297ab957fb166c4e6c67361de50f98cf6d7c20
cfc34c5f7fca9b45220c99e0bd6983dc3ea353f3
from master branch and corrected indentation.
diff --git a/pykolab/setup/setup_freebusy.py b/pykolab/setup/setup_freebusy.py
index 7fe7d5f..9d99ca9 100644
--- a/pykolab/setup/setup_freebusy.py
+++ b/pykolab/setup/setup_freebusy.py
@@ -114,7 +114,7 @@ def execute(*args, **kw):
elif os.path.isfile('/sbin/service'):
subprocess.call(['/sbin/service', 'httpd', 'restart'])
elif os.path.isfile('/usr/sbin/service'):
- subprocess.call(['/usr/sbin/service','apache2','restart'])
+ subprocess.call(['/usr/sbin/service','apache2','restart'])
else:
log.error(_("Could not start the webserver server service."))
diff --git a/pykolab/setup/setup_imap.py b/pykolab/setup/setup_imap.py
index bd33a5b..4cf883d 100644
--- a/pykolab/setup/setup_imap.py
+++ b/pykolab/setup/setup_imap.py
@@ -131,12 +131,12 @@ def execute(*args, **kw):
fp.close()
if os.path.isfile('/etc/default/kolab-saslauthd'):
- myaugeas = Augeas()
- setting = os.path.join('/files/etc/default/kolab-saslauthd','START')
- if not myaugeas.get(setting) == 'yes':
- myaugeas.set(setting,'yes')
- myaugeas.save()
- myaugeas.close()
+ myaugeas = Augeas()
+ setting = os.path.join('/files/etc/default/kolab-saslauthd','START')
+ if not myaugeas.get(setting) == 'yes':
+ myaugeas.set(setting,'yes')
+ myaugeas.save()
+ myaugeas.close()
if os.path.isfile('/bin/systemctl'):
subprocess.call(['systemctl', 'restart', 'cyrus-imapd.service'])
@@ -145,8 +145,8 @@ def execute(*args, **kw):
subprocess.call(['service', 'cyrus-imapd', 'restart'])
subprocess.call(['service', 'kolab-saslauthd', 'restart'])
elif os.path.isfile('/usr/sbin/service'):
- subprocess.call(['/usr/sbin/service','cyrus-imapd','restart'])
- subprocess.call(['/usr/sbin/service','kolab-saslauthd','restart'])
+ subprocess.call(['/usr/sbin/service','cyrus-imapd','restart'])
+ subprocess.call(['/usr/sbin/service','kolab-saslauthd','restart'])
else:
log.error(_("Could not start the cyrus-imapd and kolab-saslauthd services."))
diff --git a/pykolab/setup/setup_kolabd.py b/pykolab/setup/setup_kolabd.py
index df05043..47d1cae 100644
--- a/pykolab/setup/setup_kolabd.py
+++ b/pykolab/setup/setup_kolabd.py
@@ -67,7 +67,7 @@ def execute(*args, **kw):
elif os.path.isfile('/sbin/service'):
subprocess.call(['/sbin/service', 'kolabd', 'restart'])
elif os.path.isfile('/usr/sbin/service'):
- subprocess.call(['/usr/sbin/service','kolab-server','restart'])
+ subprocess.call(['/usr/sbin/service','kolab-server','restart'])
else:
log.error(_("Could not start the kolab server service."))
diff --git a/pykolab/setup/setup_ldap.py b/pykolab/setup/setup_ldap.py
index df836c4..2fe2baf 100644
--- a/pykolab/setup/setup_ldap.py
+++ b/pykolab/setup/setup_ldap.py
@@ -288,9 +288,9 @@ ServerAdminPwd = %(admin_pass)s
elif os.path.isfile('/sbin/service'):
subprocess.call(['/sbin/service', 'dirsrv', 'restart'])
elif os.path.isfile('/usr/sbin/service'):
- subprocess.call(['/usr/sbin/service','dirsrv','stop'])
- time.sleep(20)
- subprocess.call(['/usr/sbin/service','dirsrv','start'])
+ subprocess.call(['/usr/sbin/service','dirsrv','stop'])
+ time.sleep(20)
+ subprocess.call(['/usr/sbin/service','dirsrv','start'])
else:
log.error(_("Could not start the directory server service."))
diff --git a/pykolab/setup/setup_mta.py b/pykolab/setup/setup_mta.py
index 09f6d06..d91a3a7 100644
--- a/pykolab/setup/setup_mta.py
+++ b/pykolab/setup/setup_mta.py
@@ -307,10 +307,10 @@ result_attribute = mail
subprocess.call(['service', 'clamd.amavisd', 'restart'])
subprocess.call(['service', 'wallace', 'restart'])
elif os.path.isfile('/usr/sbin/service'):
- subprocess.call(['/usr/sbin/service','postfix','restart'])
- subprocess.call(['/usr/sbin/service','amavis','restart'])
- subprocess.call(['/usr/sbin/service','clamav-daemon','restart'])
- subprocess.call(['/usr/sbin/service','wallace','restart'])
+ subprocess.call(['/usr/sbin/service','postfix','restart'])
+ subprocess.call(['/usr/sbin/service','amavis','restart'])
+ subprocess.call(['/usr/sbin/service','clamav-daemon','restart'])
+ subprocess.call(['/usr/sbin/service','wallace','restart'])
else:
log.error(_("Could not start the postfix, clamav and amavisd services services."))
diff --git a/pykolab/setup/setup_mysql.py b/pykolab/setup/setup_mysql.py
index e4940a0..975c2fe 100644
--- a/pykolab/setup/setup_mysql.py
+++ b/pykolab/setup/setup_mysql.py
@@ -44,7 +44,7 @@ def execute(*args, **kw):
elif os.path.isfile('/sbin/service'):
subprocess.call(['/sbin/service', 'mysqld', 'restart'])
elif os.path.isfile('/usr/sbin/service'):
- subprocess.call(['/usr/sbin/service','mysql','restart'])
+ subprocess.call(['/usr/sbin/service','mysql','restart'])
else:
log.error(_("Could not start the MySQL database service."))
diff --git a/pykolab/setup/setup_roundcube.py b/pykolab/setup/setup_roundcube.py
index 4a5b394..8361d8c 100644
--- a/pykolab/setup/setup_roundcube.py
+++ b/pykolab/setup/setup_roundcube.py
@@ -185,7 +185,7 @@ def execute(*args, **kw):
elif os.path.isfile('/sbin/service'):
subprocess.call(['/sbin/service', 'httpd', 'restart'])
elif os.path.isfile('/usr/sbin/service'):
- subprocess.call(['/usr/sbin/service','apache2','restart'])
+ subprocess.call(['/usr/sbin/service','apache2','restart'])
else:
log.error(_("Could not start the webserver server service."))
diff --git a/pykolab/setup/setup_syncroton.py b/pykolab/setup/setup_syncroton.py
index 46d5190..c14682e 100644
--- a/pykolab/setup/setup_syncroton.py
+++ b/pykolab/setup/setup_syncroton.py
@@ -61,7 +61,7 @@ def execute(*args, **kw):
elif os.path.isfile('/sbin/service'):
subprocess.call(['/sbin/service', 'httpd', 'restart'])
elif os.path.isfile('/usr/sbin/service'):
- subprocess.call(['/usr/sbin/service','apache2','restart'])
+ subprocess.call(['/usr/sbin/service','apache2','restart'])
else:
log.error(_("Could not start the webserver server service."))
diff --git a/pykolab/setup/setup_zpush.py b/pykolab/setup/setup_zpush.py
index b1ba921..4c84d3a 100644
--- a/pykolab/setup/setup_zpush.py
+++ b/pykolab/setup/setup_zpush.py
@@ -93,7 +93,7 @@ def execute(*args, **kw):
elif os.path.isfile('/sbin/service'):
subprocess.call(['/sbin/service', 'httpd', 'restart'])
elif os.path.isfile('/usr/sbin/service'):
- subprocess.call(['/usr/sbin/service','apache2','restart'])
+ subprocess.call(['/usr/sbin/service','apache2','restart'])
else:
log.error(_("Could not start the webserver server service."))
commit 6c297ab957fb166c4e6c67361de50f98cf6d7c20
Author: Johannes Graumann <johannes_graumann at web.de>
Date: Mon Oct 15 22:20:06 2012 +0300
Debianize: Edit /etc/default/kolab-saslauthd to allow for init script mediated startup;
diff --git a/pykolab/setup/setup_imap.py b/pykolab/setup/setup_imap.py
index 7ad9966..bd33a5b 100644
--- a/pykolab/setup/setup_imap.py
+++ b/pykolab/setup/setup_imap.py
@@ -17,6 +17,7 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
+from augeas import Augeas
from Cheetah.Template import Template
import os
import subprocess
@@ -129,6 +130,14 @@ def execute(*args, **kw):
fp.write("\n".join(annotations))
fp.close()
+ if os.path.isfile('/etc/default/kolab-saslauthd'):
+ myaugeas = Augeas()
+ setting = os.path.join('/files/etc/default/kolab-saslauthd','START')
+ if not myaugeas.get(setting) == 'yes':
+ myaugeas.set(setting,'yes')
+ myaugeas.save()
+ myaugeas.close()
+
if os.path.isfile('/bin/systemctl'):
subprocess.call(['systemctl', 'restart', 'cyrus-imapd.service'])
subprocess.call(['systemctl', 'restart', 'kolab-saslauthd.service'])
commit cfc34c5f7fca9b45220c99e0bd6983dc3ea353f3
Author: Johannes Graumann <johannes_graumann at web.de>
Date: Mon Oct 15 22:17:06 2012 +0300
Debianize service restarts/init script updates;
diff --git a/pykolab/setup/setup_freebusy.py b/pykolab/setup/setup_freebusy.py
index 22c74c4..7fe7d5f 100644
--- a/pykolab/setup/setup_freebusy.py
+++ b/pykolab/setup/setup_freebusy.py
@@ -111,11 +111,20 @@ def execute(*args, **kw):
if os.path.isfile('/bin/systemctl'):
subprocess.call(['/bin/systemctl', 'restart', 'httpd.service'])
- subprocess.call(['/bin/systemctl', 'enable', 'httpd.service'])
elif os.path.isfile('/sbin/service'):
subprocess.call(['/sbin/service', 'httpd', 'restart'])
+ elif os.path.isfile('/usr/sbin/service'):
+ subprocess.call(['/usr/sbin/service','apache2','restart'])
+ else:
+ log.error(_("Could not start the webserver server service."))
+
+ if os.path.isfile('/bin/systemctl'):
+ subprocess.call(['/bin/systemctl', 'enable', 'httpd.service'])
+ elif os.path.isfile('/sbin/chkconfig'):
subprocess.call(['/sbin/chkconfig', 'httpd', 'on'])
+ elif os.path.isfile('/usr/sbin/update-rc.d'):
+ subprocess.call(['/usr/sbin/update-rc.d', 'apache2', 'defaults'])
else:
- log.error(_("Could not start and configure to start on boot, the " + \
- "webserver service."))
+ log.error(_("Could not configure to start on boot, the " + \
+ "webserver server service."))
diff --git a/pykolab/setup/setup_imap.py b/pykolab/setup/setup_imap.py
index 750e43d..7ad9966 100644
--- a/pykolab/setup/setup_imap.py
+++ b/pykolab/setup/setup_imap.py
@@ -131,14 +131,26 @@ def execute(*args, **kw):
if os.path.isfile('/bin/systemctl'):
subprocess.call(['systemctl', 'restart', 'cyrus-imapd.service'])
- subprocess.call(['systemctl', 'enable', 'cyrus-imapd.service'])
subprocess.call(['systemctl', 'restart', 'kolab-saslauthd.service'])
- subprocess.call(['systemctl', 'enable', 'kolab-saslauthd.service'])
elif os.path.isfile('/sbin/service'):
subprocess.call(['service', 'cyrus-imapd', 'restart'])
- subprocess.call(['chkconfig', 'cyrus-imapd', 'on'])
subprocess.call(['service', 'kolab-saslauthd', 'restart'])
+ elif os.path.isfile('/usr/sbin/service'):
+ subprocess.call(['/usr/sbin/service','cyrus-imapd','restart'])
+ subprocess.call(['/usr/sbin/service','kolab-saslauthd','restart'])
+ else:
+ log.error(_("Could not start the cyrus-imapd and kolab-saslauthd services."))
+
+ if os.path.isfile('/bin/systemctl'):
+ subprocess.call(['systemctl', 'enable', 'cyrus-imapd.service'])
+ subprocess.call(['systemctl', 'enable', 'kolab-saslauthd.service'])
+ elif os.path.isfile('/sbin/chkconfig'):
+ subprocess.call(['chkconfig', 'cyrus-imapd', 'on'])
subprocess.call(['chkconfig', 'kolab-saslauthd', 'on'])
+ elif os.path.isfile('/usr/sbin/update-rc.d'):
+ subprocess.call(['/usr/sbin/update-rc.d', 'cyrus-imapd', 'defaults'])
+ subprocess.call(['/usr/sbin/update-rc.d', 'kolab-saslauthd', 'defaults'])
+ subprocess.call(['/usr/sbin/update-rc.d', 'saslauthd', 'disable'])
else:
- log.error(_("Could not start and configure to start on boot, the " + \
- "cyrus-imapd and kolab-saslauthd services."))
+ log.error(_("Could not configure to start on boot, the " + \
+ "cyrus-imapd and kolab-saslauthd services."))
diff --git a/pykolab/setup/setup_kolabd.py b/pykolab/setup/setup_kolabd.py
index 9e35a85..df05043 100644
--- a/pykolab/setup/setup_kolabd.py
+++ b/pykolab/setup/setup_kolabd.py
@@ -63,8 +63,20 @@ def execute(*args, **kw):
fp.close()
if os.path.isfile('/bin/systemctl'):
- subprocess.call(['systemctl', 'restart', 'kolabd.service'])
- subprocess.call(['systemctl', 'enable', 'kolabd.service'])
+ subprocess.call(['/bin/systemctl', 'restart', 'kolabd.service'])
elif os.path.isfile('/sbin/service'):
- subprocess.call(['service', 'kolabd', 'restart'])
- subprocess.call(['chkconfig', 'kolabd', 'on'])
+ subprocess.call(['/sbin/service', 'kolabd', 'restart'])
+ elif os.path.isfile('/usr/sbin/service'):
+ subprocess.call(['/usr/sbin/service','kolab-server','restart'])
+ else:
+ log.error(_("Could not start the kolab server service."))
+
+ if os.path.isfile('/bin/systemctl'):
+ subprocess.call(['/bin/systemctl', 'enable', 'kolabd.service'])
+ elif os.path.isfile('/sbin/chkconfig'):
+ subprocess.call(['/sbin/chkconfig', 'kolabd', 'on'])
+ elif os.path.isfile('/usr/sbin/update-rc.d'):
+ subprocess.call(['/usr/sbin/update-rc.d', 'kolab-server', 'defaults'])
+ else:
+ log.error(_("Could not configure to start on boot, the " + \
+ "kolab server service."))
diff --git a/pykolab/setup/setup_ldap.py b/pykolab/setup/setup_ldap.py
index b1b76dc..df836c4 100644
--- a/pykolab/setup/setup_ldap.py
+++ b/pykolab/setup/setup_ldap.py
@@ -285,12 +285,23 @@ ServerAdminPwd = %(admin_pass)s
if os.path.isfile('/bin/systemctl'):
subprocess.call(['/bin/systemctl', 'restart', 'dirsrv.target'])
- subprocess.call(['/bin/systemctl', 'enable', 'dirsrv.target'])
elif os.path.isfile('/sbin/service'):
subprocess.call(['/sbin/service', 'dirsrv', 'restart'])
+ elif os.path.isfile('/usr/sbin/service'):
+ subprocess.call(['/usr/sbin/service','dirsrv','stop'])
+ time.sleep(20)
+ subprocess.call(['/usr/sbin/service','dirsrv','start'])
+ else:
+ log.error(_("Could not start the directory server service."))
+
+ if os.path.isfile('/bin/systemctl'):
+ subprocess.call(['/bin/systemctl', 'enable', 'dirsrv.target'])
+ elif os.path.isfile('/sbin/chkconfig'):
subprocess.call(['/sbin/chkconfig', 'dirsrv', 'on'])
+ elif os.path.isfile('/usr/sbin/update-rc.d'):
+ subprocess.call(['/usr/sbin/update-rc.d', 'dirsrv', 'defaults'])
else:
- log.error(_("Could not start and configure to start on boot, the " + \
+ log.error(_("Could not configure to start on boot, the " + \
"directory server service."))
if ask_questions:
@@ -520,8 +531,10 @@ ServerAdminPwd = %(admin_pass)s
if os.path.isfile('/bin/systemctl'):
subprocess.call(['/bin/systemctl', 'enable', 'dirsrv-admin.service'])
- elif os.path.isfile('/sbin/service'):
+ elif os.path.isfile('/sbin/chkconfig'):
subprocess.call(['/sbin/chkconfig', 'dirsrv-admin', 'on'])
+ elif os.path.isfile('/usr/sbin/update-rc.d'):
+ subprocess.call(['/usr/sbin/update-rc.d', 'dirsrv-admin', 'defaults'])
else:
log.error(_("Could not start and configure to start on boot, the " + \
"directory server admin service."))
diff --git a/pykolab/setup/setup_mta.py b/pykolab/setup/setup_mta.py
index e6a019c..09f6d06 100644
--- a/pykolab/setup/setup_mta.py
+++ b/pykolab/setup/setup_mta.py
@@ -298,23 +298,37 @@ result_attribute = mail
if os.path.isfile('/bin/systemctl'):
subprocess.call(['systemctl', 'restart', 'postfix.service'])
- subprocess.call(['systemctl', 'enable', 'postfix.service'])
subprocess.call(['systemctl', 'restart', 'amavisd.service'])
- subprocess.call(['systemctl', 'enable', 'amavisd.service'])
subprocess.call(['systemctl', 'restart', 'clamd.amavisd.service'])
- subprocess.call(['systemctl', 'enable', 'clamd.amavisd.service'])
subprocess.call(['systemctl', 'restart', 'wallace.service'])
- subprocess.call(['systemctl', 'enable', 'wallace.service'])
elif os.path.isfile('/sbin/service'):
subprocess.call(['service', 'postfix', 'restart'])
- subprocess.call(['chkconfig', 'postfix', 'on'])
subprocess.call(['service', 'amavisd', 'restart'])
- subprocess.call(['chkconfig', 'amavisd', 'on'])
subprocess.call(['service', 'clamd.amavisd', 'restart'])
- subprocess.call(['chkconfig', 'clamd.amavisd', 'on'])
subprocess.call(['service', 'wallace', 'restart'])
- subprocess.call(['chkconfig', 'wallace', 'on'])
+ elif os.path.isfile('/usr/sbin/service'):
+ subprocess.call(['/usr/sbin/service','postfix','restart'])
+ subprocess.call(['/usr/sbin/service','amavis','restart'])
+ subprocess.call(['/usr/sbin/service','clamav-daemon','restart'])
+ subprocess.call(['/usr/sbin/service','wallace','restart'])
else:
- log.error(_("Could not start and configure to start on boot, the " + \
- "postfix, clamav.amavisd and amavisd services."))
+ log.error(_("Could not start the postfix, clamav and amavisd services services."))
+ if os.path.isfile('/bin/systemctl'):
+ subprocess.call(['systemctl', 'enable', 'postfix.service'])
+ subprocess.call(['systemctl', 'enable', 'amavisd.service'])
+ subprocess.call(['systemctl', 'enable', 'clamd.amavisd.service'])
+ subprocess.call(['systemctl', 'enable', 'wallace.service'])
+ elif os.path.isfile('/sbin/chkconfig'):
+ subprocess.call(['chkconfig', 'postfix', 'on'])
+ subprocess.call(['chkconfig', 'amavisd', 'on'])
+ subprocess.call(['chkconfig', 'clamd.amavisd', 'on'])
+ subprocess.call(['chkconfig', 'wallace', 'on'])
+ elif os.path.isfile('/usr/sbin/update-rc.d'):
+ subprocess.call(['/usr/sbin/update-rc.d', 'postfix', 'defaults'])
+ subprocess.call(['/usr/sbin/update-rc.d', 'amavis', 'defaults'])
+ subprocess.call(['/usr/sbin/update-rc.d', 'clamav-daemon', 'defaults'])
+ subprocess.call(['/usr/sbin/update-rc.d', 'wallace', 'defaults'])
+ else:
+ log.error(_("Could not configure to start on boot, the " + \
+ "postfix, clamav and amavisd services."))
diff --git a/pykolab/setup/setup_mysql.py b/pykolab/setup/setup_mysql.py
index 093d187..e4940a0 100644
--- a/pykolab/setup/setup_mysql.py
+++ b/pykolab/setup/setup_mysql.py
@@ -40,15 +40,24 @@ def description():
def execute(*args, **kw):
if os.path.isfile('/bin/systemctl'):
- subprocess.call(['/bin/systemctl', 'start', 'mysqld.service'])
- subprocess.call(['/bin/systemctl', 'enable', 'mysqld.service'])
+ subprocess.call(['/bin/systemctl', 'restart', 'mysqld.service'])
elif os.path.isfile('/sbin/service'):
- subprocess.call(['/sbin/service', 'mysqld', 'start'])
- subprocess.call(['/sbin/chkconfig', 'mysqld', 'on'])
+ subprocess.call(['/sbin/service', 'mysqld', 'restart'])
+ elif os.path.isfile('/usr/sbin/service'):
+ subprocess.call(['/usr/sbin/service','mysql','restart'])
else:
- log.error(_("Could not start and configure to start on boot, the " + \
- "MySQL database service."))
+ log.error(_("Could not start the MySQL database service."))
+ if os.path.isfile('/bin/systemctl'):
+ subprocess.call(['/bin/systemctl', 'enable', 'mysqld.service'])
+ elif os.path.isfile('/sbin/chkconfig'):
+ subprocess.call(['/sbin/chkconfig', 'mysqld', 'on'])
+ elif os.path.isfile('/usr/sbin/update-rc.d'):
+ subprocess.call(['/usr/sbin/update-rc.d', 'mysql', 'defaults'])
+ else:
+ log.error(_("Could not configure to start on boot, the " + \
+ "MySQL database service."))
+
print >> sys.stderr, utils.multiline_message(
_("""
Please supply a root password for MySQL. This password will
diff --git a/pykolab/setup/setup_roundcube.py b/pykolab/setup/setup_roundcube.py
index 0f45711..4a5b394 100644
--- a/pykolab/setup/setup_roundcube.py
+++ b/pykolab/setup/setup_roundcube.py
@@ -182,11 +182,20 @@ def execute(*args, **kw):
if os.path.isfile('/bin/systemctl'):
subprocess.call(['/bin/systemctl', 'restart', 'httpd.service'])
- subprocess.call(['/bin/systemctl', 'enable', 'httpd.service'])
elif os.path.isfile('/sbin/service'):
subprocess.call(['/sbin/service', 'httpd', 'restart'])
+ elif os.path.isfile('/usr/sbin/service'):
+ subprocess.call(['/usr/sbin/service','apache2','restart'])
+ else:
+ log.error(_("Could not start the webserver server service."))
+
+ if os.path.isfile('/bin/systemctl'):
+ subprocess.call(['/bin/systemctl', 'enable', 'httpd.service'])
+ elif os.path.isfile('/sbin/chkconfig'):
subprocess.call(['/sbin/chkconfig', 'httpd', 'on'])
+ elif os.path.isfile('/usr/sbin/update-rc.d'):
+ subprocess.call(['/usr/sbin/update-rc.d', 'apache2', 'defaults'])
else:
- log.error(_("Could not start and configure to start on boot, the " + \
- "webserver service."))
+ log.error(_("Could not configure to start on boot, the " + \
+ "webserver server service."))
diff --git a/pykolab/setup/setup_syncroton.py b/pykolab/setup/setup_syncroton.py
index 8298db5..46d5190 100644
--- a/pykolab/setup/setup_syncroton.py
+++ b/pykolab/setup/setup_syncroton.py
@@ -58,11 +58,20 @@ def execute(*args, **kw):
if os.path.isfile('/bin/systemctl'):
subprocess.call(['/bin/systemctl', 'restart', 'httpd.service'])
- subprocess.call(['/bin/systemctl', 'enable', 'httpd.service'])
elif os.path.isfile('/sbin/service'):
subprocess.call(['/sbin/service', 'httpd', 'restart'])
+ elif os.path.isfile('/usr/sbin/service'):
+ subprocess.call(['/usr/sbin/service','apache2','restart'])
+ else:
+ log.error(_("Could not start the webserver server service."))
+
+ if os.path.isfile('/bin/systemctl'):
+ subprocess.call(['/bin/systemctl', 'enable', 'httpd.service'])
+ elif os.path.isfile('/sbin/chkconfig'):
subprocess.call(['/sbin/chkconfig', 'httpd', 'on'])
+ elif os.path.isfile('/usr/sbin/update-rc.d'):
+ subprocess.call(['/usr/sbin/update-rc.d', 'apache2', 'defaults'])
else:
- log.error(_("Could not start and configure to start on boot, the " + \
- "webserver service."))
+ log.error(_("Could not configure to start on boot, the " + \
+ "webserver server service."))
diff --git a/pykolab/setup/setup_zpush.py b/pykolab/setup/setup_zpush.py
index 3aa7a0b..b1ba921 100644
--- a/pykolab/setup/setup_zpush.py
+++ b/pykolab/setup/setup_zpush.py
@@ -90,11 +90,20 @@ def execute(*args, **kw):
if os.path.isfile('/bin/systemctl'):
subprocess.call(['/bin/systemctl', 'restart', 'httpd.service'])
- subprocess.call(['/bin/systemctl', 'enable', 'httpd.service'])
elif os.path.isfile('/sbin/service'):
subprocess.call(['/sbin/service', 'httpd', 'restart'])
- subprocess.call(['/sbin/chkconfig', 'httpd', 'on'])
+ elif os.path.isfile('/usr/sbin/service'):
+ subprocess.call(['/usr/sbin/service','apache2','restart'])
else:
- log.error(_("Could not start and configure to start on boot, the " + \
- "webserver service."))
+ log.error(_("Could not start the webserver server service."))
+ if os.path.isfile('/bin/systemctl'):
+ subprocess.call(['/bin/systemctl', 'enable', 'httpd.service'])
+ elif os.path.isfile('/sbin/chkconfig'):
+ subprocess.call(['/sbin/chkconfig', 'httpd', 'on'])
+ elif os.path.isfile('/usr/sbin/update-rc.d'):
+ subprocess.call(['/usr/sbin/update-rc.d', 'apache2', 'defaults'])
+ else:
+ log.error(_("Could not configure to start on boot, the " + \
+ "webserver server service."))
+
More information about the commits
mailing list