Bot & Automation
jorgasisten
/root/hermes-projects/jorgasisten
update_env.py
text
from pathlib import Path
env_path = Path("/root/hermes-projects/jorgasisten/.env")
if env_path.exists():
content = env_path.read_text(encoding="utf-8")
else:
content = ""
# Ensure we don't duplicate them
lines = content.splitlines()
new_lines = []
for line in lines:
if not line.startswith("WA_API_URL=") and not line.startswith("WA_APIKEY="):
new_lines.append(line)
new_lines.append("WA_API_URL=http://evolution-api:8080")
new_lines.append("WA_APIKEY=ApiKeyJorgAsisten2026")
env_path.write_text("\n".join(new_lines) + "\n", encoding="utf-8")
print("SUCCESS: Updated .env with WA_API_URL and WA_APIKEY on VPS")