From 34fd4ed7d077c1d03c217e3991df5c81a8587716 Mon Sep 17 00:00:00 2001 From: Vovche Date: Fri, 2 Mar 2018 04:27:52 +0200 Subject: [PATCH] added check if the services has started --- autosploit/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autosploit/main.py b/autosploit/main.py index b48ee83..96e3e93 100644 --- a/autosploit/main.py +++ b/autosploit/main.py @@ -29,17 +29,17 @@ def main(): info("checking for services") service_names = ("postgresql", "apache") for service in list(service_names): - if not check_services(service): + while not check_services(service): choice = prompt("it appears that service {} is not enabled, would you like us to enable it for you[y/N]".format(service)) if choice.lower().startswith("y"): if "postgre" in service: cmdline("sudo bash {}".format(START_POSTGRESQL_PATH)) else: cmdline("sudo bash {}".format(START_APACHE_PATH)) - info("service started successfully") else: error("service {} is required to be started for autosploit to run, exiting".format(service.title())) sys.exit(1) + info("services started successfully") if len(sys.argv) > 1: info("attempting to load API keys")