3
.gitignore
vendored
3
.gitignore
vendored
@@ -55,3 +55,6 @@ docs/_build/
|
|||||||
|
|
||||||
# PyBuilder
|
# PyBuilder
|
||||||
target/
|
target/
|
||||||
|
|
||||||
|
# PyCharm
|
||||||
|
.idea/
|
||||||
|
|||||||
@@ -82,21 +82,19 @@ class Opendkim(base.Installer):
|
|||||||
"""Additional tasks.
|
"""Additional tasks.
|
||||||
Check linux distribution (package deb, rpm), to adapt
|
Check linux distribution (package deb, rpm), to adapt
|
||||||
to config file location and syntax.
|
to config file location and syntax.
|
||||||
- update opendkim isocket port config
|
- update opendkim isocket port config for Debian based distro
|
||||||
- make sure opendkim starts after db service started
|
- make sure opendkim starts after db service started
|
||||||
"""
|
"""
|
||||||
if package.backend.FORMAT == "deb":
|
if package.backend.FORMAT == "deb":
|
||||||
params_file = "/etc/default/opendkim"
|
params_file = "/etc/default/opendkim"
|
||||||
else:
|
pattern = r"s/^(SOCKET=.*)/#\1/"
|
||||||
params_file = "/etc/opendkim.conf"
|
utils.exec_cmd(
|
||||||
pattern = r"s/^(SOCKET=.*)/#\1/"
|
"perl -pi -e '{}' {}".format(pattern, params_file))
|
||||||
utils.exec_cmd(
|
with open(params_file, "a") as f:
|
||||||
"perl -pi -e '{}' {}".format(pattern, params_file))
|
f.write('\n'.join([
|
||||||
with open(params_file, "a") as f:
|
"",
|
||||||
f.write('\n'.join([
|
'SOCKET="inet:12345@localhost"',
|
||||||
"",
|
]))
|
||||||
'SOCKET="inet:12345@localhost"',
|
|
||||||
]))
|
|
||||||
|
|
||||||
# Make sure opendkim is started after postgresql and mysql,
|
# Make sure opendkim is started after postgresql and mysql,
|
||||||
# respectively.
|
# respectively.
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ class Spamassassin(base.Installer):
|
|||||||
"""Additional tasks."""
|
"""Additional tasks."""
|
||||||
amavis_user = self.config.get("amavis", "user")
|
amavis_user = self.config.get("amavis", "user")
|
||||||
pw = pwd.getpwnam(amavis_user)
|
pw = pwd.getpwnam(amavis_user)
|
||||||
install("razor", self.config, self.upgrade)
|
install("razor", self.config, self.upgrade, self.archive_path)
|
||||||
if utils.dist_name() in ["debian", "ubuntu"]:
|
if utils.dist_name() in ["debian", "ubuntu"]:
|
||||||
utils.exec_cmd(
|
utils.exec_cmd(
|
||||||
"perl -pi -e 's/^CRON=0/CRON=1/' /etc/cron.daily/spamassassin")
|
"perl -pi -e 's/^CRON=0/CRON=1/' /etc/cron.daily/spamassassin")
|
||||||
|
|||||||
5
run.py
5
run.py
@@ -238,7 +238,10 @@ def main(input_args):
|
|||||||
ssl_backend.generate_cert()
|
ssl_backend.generate_cert()
|
||||||
for appname in PRIMARY_APPS:
|
for appname in PRIMARY_APPS:
|
||||||
scripts.install(appname, config, args.upgrade, args.restore)
|
scripts.install(appname, config, args.upgrade, args.restore)
|
||||||
system.restart_service("cron")
|
if package.backend.FORMAT == "deb":
|
||||||
|
system.restart_service("cron")
|
||||||
|
else:
|
||||||
|
system.restart_service("crond")
|
||||||
package.backend.restore_system()
|
package.backend.restore_system()
|
||||||
if not args.restore:
|
if not args.restore:
|
||||||
utils.success(
|
utils.success(
|
||||||
|
|||||||
Reference in New Issue
Block a user