Add 'scripts/wallabag/main.py'

pull/4/head
drunkendog 2022-09-22 19:30:18 +01:00
parent 6bd22e6936
commit 348c902e32
1 changed files with 10 additions and 0 deletions

10
scripts/wallabag/main.py Normal file
View File

@ -0,0 +1,10 @@
import os, sys
with open("../nginx-site-template.conf", "r") as f:
template = f.read().replace("# server_name serverNameVar;", f"server_name {sys.argv[1]};")
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")