generated from nathanwoodburn/python-webserver-template
fix: Use a better env name
All checks were successful
Build Docker / BuildImage (push) Successful in 36s
All checks were successful
Build Docker / BuildImage (push) Successful in 36s
This commit is contained in:
parent
1f2dbe0e99
commit
d30aa6e427
@ -81,13 +81,14 @@ def renew():
|
|||||||
return jsonify({"error": "No domain provided"}), 400
|
return jsonify({"error": "No domain provided"}), 400
|
||||||
|
|
||||||
# Get path from env
|
# Get path from env
|
||||||
path = os.getenv("PATH")
|
path = os.getenv("SCRIPT_PATH")
|
||||||
wallet = os.getenv("WALLET")
|
wallet = os.getenv("WALLET")
|
||||||
apiKEY = os.getenv("API_KEY")
|
apiKEY = os.getenv("API_KEY")
|
||||||
if not path:
|
if not path:
|
||||||
return jsonify({"error": "No HS-ANYONE found"}), 400
|
return jsonify({"error": "No HS-ANYONE found"}), 400
|
||||||
|
|
||||||
# Run the renewal
|
# Run the renewal
|
||||||
|
print(f"Command: node {path} renew {domain} --wallet {wallet} --network main --broadcast true --apikey {apiKEY}")
|
||||||
output = subprocess.run(["node", path, "renew", domain, "--wallet", wallet, "--network", "main", "--broadcast", "true", "--apikey", apiKEY], capture_output=True, text=True)
|
output = subprocess.run(["node", path, "renew", domain, "--wallet", wallet, "--network", "main", "--broadcast", "true", "--apikey", apiKEY], capture_output=True, text=True)
|
||||||
return jsonify({"output": output.stdout,"error": output.stderr}), 200
|
return jsonify({"output": output.stdout,"error": output.stderr}), 200
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user