-
This commit is contained in:
parent
9d6bf08db0
commit
affc2275e4
6
app.py
6
app.py
@ -109,8 +109,10 @@ def create_conf_post():
|
|||||||
sendmail_path = os.path.join(os.getcwd(), 'configs', "sendmail.sh")
|
sendmail_path = os.path.join(os.getcwd(), 'configs', "sendmail.sh")
|
||||||
msmtp_conf = os.path.join(os.getcwd(), 'configs', "msmtprc")
|
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,
|
subprocess.run([script_path, "-i "+ini_path, "-c "+conf_path,
|
||||||
"-p "+ip, "-a "+authorized_keys_path, "-d "+sshd_config_path, "-m "+sendmail_path, "-o "+msmtp_conf," > /dev/null 2>&1 "])
|
"-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):
|
if os.path.exists(folder):
|
||||||
shutil.rmtree(folder)
|
shutil.rmtree(folder)
|
||||||
|
1
utils.py
1
utils.py
@ -44,6 +44,7 @@ def ssh_thread_function():
|
|||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
if os.path.exists(os.path.join(os.getcwd(), 'keys', "sshkey")) is False:
|
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 ""'])
|
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:
|
while os.path.exists(os.path.join(os.getcwd(), 'keys', "sshkey")) is False:
|
||||||
pass
|
pass
|
||||||
|
Loading…
Reference in New Issue
Block a user