diff --git a/app.py b/app.py index 316149e..f77300a 100644 --- a/app.py +++ b/app.py @@ -17,7 +17,10 @@ def create_email_account(username, password): cmd = ["echo", password, "|", "doas", "-u", "maddy", "maddy", "creds", "create", f"{username}@hectabit.org"] result = subprocess.run(" ".join(cmd), shell=True, check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - if result.returncode == 0: + cmd2 = ["doas", "-u", "maddy", "maddy", "imap-acct", "create", f"{username}@hectabit.org"] + result2 = subprocess.run(" ".join(cmd2), shell=True, check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + + if result.returncode == 0 and result2.returncode == 0: # Command executed successfully return True else: