Added automx support.

see #98
This commit is contained in:
Antoine Nguyen
2017-02-09 14:40:39 +01:00
parent 48227fcf5f
commit 5f36d6231f
14 changed files with 273 additions and 54 deletions

15
run.py
View File

@@ -21,8 +21,8 @@ def main():
help="Enable debug output")
parser.add_argument("--force", action="store_true", default=False,
help="Force installation")
parser.add_argument("hostname", type=str,
help="The hostname of your future mail server")
parser.add_argument("domain", type=str,
help="The main domain of your future mail server")
args = parser.parse_args()
if args.debug:
@@ -33,10 +33,10 @@ def main():
config.readfp(fp)
if not config.has_section("general"):
config.add_section("general")
config.set("general", "hostname", args.hostname)
config.set("general", "domain", args.domain)
utils.printcolor(
"Your mail server {} will be installed with the following components:"
.format(args.hostname), utils.BLUE)
"Your mail server will be installed with the following components:",
utils.BLUE)
components = []
for section in config.sections():
if section in ["general", "database", "mysql", "postgres",
@@ -61,12 +61,15 @@ def main():
if ssl_backend:
ssl_backend.create()
scripts.install("modoboa", config)
scripts.install("automx", config)
scripts.install("uwsgi", config)
scripts.install("nginx", config)
scripts.install("postfix", config)
scripts.install("amavis", config)
scripts.install("dovecot", config)
utils.printcolor(
"Congratulations! You can enjoy Modoboa at https://{} (admin:password)"
.format(args.hostname),
.format(config.get("general", "hostname")),
utils.GREEN)
if __name__ == "__main__":