fix
This commit is contained in:
parent
0258778e5c
commit
683320dc44
6
main.py
6
main.py
@ -35,7 +35,7 @@ def update_host(host: str) -> bool:
|
||||
print("Not correct node")
|
||||
return False
|
||||
|
||||
gen_command = f"docker exec -it {container_name} certbot --nginx --email emmtvv@gmail.com --agree-tos -d \"{host}\""
|
||||
gen_command = f"docker exec {container_name} certbot --nginx --email emmtvv@gmail.com --agree-tos -d \"{host}\""
|
||||
print(gen_command)
|
||||
|
||||
gen_cert = call(gen_command)
|
||||
@ -43,12 +43,12 @@ def update_host(host: str) -> bool:
|
||||
print(f"failed generating certificate: {gen_cert.err}")
|
||||
return False
|
||||
|
||||
fullchain_command = call(f"docker exec -it {container_name} cat /etc/letsencrypt/live/{host}/fullchain.pem")
|
||||
fullchain_command = call(f"docker exec {container_name} cat /etc/letsencrypt/live/{host}/fullchain.pem")
|
||||
if fullchain_command.code != 0:
|
||||
print(f"failed getting fullchain: {fullchain_command.err}")
|
||||
return True
|
||||
|
||||
privkey_command = call(f"docker exec -it {container_name} cat /etc/letsencrypt/live/{host}/privkey.pem")
|
||||
privkey_command = call(f"docker exec {container_name} cat /etc/letsencrypt/live/{host}/privkey.pem")
|
||||
if privkey_command.code != 0:
|
||||
print(f"failed getting fullchain: {privkey_command.err}")
|
||||
return True
|
||||
|
Loading…
Reference in New Issue
Block a user