Add quick recovery
parent
33dd18c792
commit
15de644813
|
@ -8,6 +8,12 @@ parser.add_argument("domain")
|
||||||
parser.add_argument("email")
|
parser.add_argument("email")
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
#QUICK_RECOVER
|
||||||
|
os.makedirs(os.path.dirname("/opt/quick-recover/"), exist_ok=True)
|
||||||
|
with open("/opt/quick-recover/#service.conf", "w") as f:
|
||||||
|
f.writeline(f"export DOMAIN='{parser.domain}'")
|
||||||
|
f.writeline(f"export EMAIL='{parser.email}'")
|
||||||
|
|
||||||
#FILE_READ
|
#FILE_READ
|
||||||
with open("../nginx-site-template.conf", "r") as f:
|
with open("../nginx-site-template.conf", "r") as f:
|
||||||
template = f.read().replace("#serverNameVar", f"{args.domain}").replace("#http://127.0.0.1:8080/", f"#ip_address")
|
template = f.read().replace("#serverNameVar", f"{args.domain}").replace("#http://127.0.0.1:8080/", f"#ip_address")
|
||||||
|
|
Loading…
Reference in New Issue