Skip to content

Commit e2dd4c3

Browse files
menkar3Ekultek
authored andcommitted
added check if the services has started (#83)
1 parent 4485fa4 commit e2dd4c3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

autosploit/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,17 @@ def main():
3030
# according to ps aux, postgre and apache2 are the names of the services
3131
service_names = ("postgres", "apache2")
3232
for service in list(service_names):
33-
if not check_services(service):
33+
while not check_services(service):
3434
choice = prompt("it appears that service {} is not enabled, would you like us to enable it for you[y/N]".format(service))
3535
if choice.lower().startswith("y"):
3636
if "postgre" in service:
3737
cmdline("sudo bash {}".format(START_POSTGRESQL_PATH))
3838
else:
3939
cmdline("sudo bash {}".format(START_APACHE_PATH))
40-
info("service started successfully")
4140
else:
4241
error("service {} is required to be started for autosploit to run, exiting".format(service.title()))
4342
sys.exit(1)
43+
info("services started successfully")
4444

4545
if len(sys.argv) > 1:
4646
info("attempting to load API keys")

0 commit comments

Comments
 (0)