standard-build/scripts/wallabag/main.py

10 lines
335 B
Python
Raw Normal View History

2022-09-22 19:30:18 +01:00
import os, sys
with open("../nginx-site-template.conf", "r") as f:
2022-09-22 19:32:12 +01:00
template = f.read().replace("#serverNameVar", f"server_name {sys.argv[1]};")
2022-09-22 19:30:18 +01:00
with open("/etc/nginx/sites-available/wallabag.conf", "w") as f:
f.write(template)
# depreceated, TODO: replace with os.subprocess
os.system("../nginx-ensite.sh wallabag.conf")