From affc2275e4bbdb4ccd01484cdc98cac0bba3690c Mon Sep 17 00:00:00 2001 From: Mateusz779 Date: Tue, 25 Apr 2023 10:07:43 +0200 Subject: [PATCH] - --- app.py | 6 ++++-- utils.py | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app.py b/app.py index f8f2a44..2979800 100644 --- a/app.py +++ b/app.py @@ -109,8 +109,10 @@ def create_conf_post(): sendmail_path = os.path.join(os.getcwd(), 'configs', "sendmail.sh") msmtp_conf = os.path.join(os.getcwd(), 'configs', "msmtprc") - subprocess.run([script_path, "-i "+ini_path, "-c "+conf_path, "-k "+pub_path, "-l "+key_length, "-n"+config_name, - "-p "+ip, "-a "+authorized_keys_path, "-d "+sshd_config_path, "-m "+sendmail_path, "-o "+msmtp_conf," > /dev/null 2>&1 "]) + subprocess.run([script_path, "-i "+ini_path, "-c "+conf_path, + "-k "+pub_path, "-l "+key_length, "-n"+config_name, + "-p "+ip, "-a "+authorized_keys_path, "-d "+sshd_config_path, + "-m "+sendmail_path, "-o "+msmtp_conf," > /dev/null 2>&1 "]) if os.path.exists(folder): shutil.rmtree(folder) diff --git a/utils.py b/utils.py index 2225fec..7d6d86d 100644 --- a/utils.py +++ b/utils.py @@ -44,6 +44,7 @@ def ssh_thread_function(): except: pass if os.path.exists(os.path.join(os.getcwd(), 'keys', "sshkey")) is False: + print(os.path.join(os.getcwd(), 'keys', "sshkey")) subprocess.run(['ssh-keygen', '-t rsa ', '-f '+os.path.join(os.getcwd(), 'keys', "sshkey"), '-P ""']) while os.path.exists(os.path.join(os.getcwd(), 'keys', "sshkey")) is False: pass