App incompatibility detection, updated for 2.2.0
This commit is contained in:
7
run.py
7
run.py
@@ -22,14 +22,13 @@ from modoboa_installer import utils
|
||||
|
||||
|
||||
PRIMARY_APPS = [
|
||||
"amavis",
|
||||
"fail2ban",
|
||||
"modoboa",
|
||||
"automx",
|
||||
"radicale",
|
||||
"uwsgi",
|
||||
"nginx",
|
||||
"opendkim",
|
||||
"rspamd",
|
||||
"postfix",
|
||||
"dovecot"
|
||||
]
|
||||
@@ -261,6 +260,7 @@ def main(input_args):
|
||||
|
||||
# Show concerned components
|
||||
components = []
|
||||
incompatible_app_detected = False
|
||||
for section in config.sections():
|
||||
if section in ["general", "database", "mysql", "postgres",
|
||||
"certificate", "letsencrypt", "backup"]:
|
||||
@@ -268,7 +268,10 @@ def main(input_args):
|
||||
if (config.has_option(section, "enabled") and
|
||||
not config.getboolean(section, "enabled")):
|
||||
continue
|
||||
incompatible_app_detected = utils.check_app_compatibility(section, config)
|
||||
components.append(section)
|
||||
if incompatible_app_detected:
|
||||
sys.exit(0)
|
||||
utils.printcolor(" ".join(components), utils.YELLOW)
|
||||
if not args.force:
|
||||
answer = utils.user_input("Do you confirm? (Y/n) ")
|
||||
|
||||
Reference in New Issue
Block a user