domain: local db goes to USER .local folder

This commit is contained in:
Cyrille L 2022-11-28 11:46:39 +01:00
parent 8fccbeee25
commit 570ed1973a
1 changed files with 8 additions and 3 deletions

View File

@ -23,8 +23,11 @@
import sys, os, subprocess, datetime import sys, os, subprocess, datetime
import check, log import check, log
# Get user dir
home_dir = os.path.expanduser('~')
# In Tyto DB dir # In Tyto DB dir
tyto_db = '/var/lib/tyto/db/' tyto_db = '%s/.local/tyto'%home_dir
tyto_domains = '%sdomains.conf'%tyto_db tyto_domains = '%sdomains.conf'%tyto_db
# In Tyto log dir # In Tyto log dir
@ -279,7 +282,9 @@ def domain_form():
# Local server Directory # Local server Directory
# ---------------------- # ----------------------
global srv global srv, srv_wip, srv_wip_files, srv_wip_images, srv_wip_template
global srv_www, srv_www_files, srv_www_images, srv_wip_template
try: srv try: srv
except: srv = '/var/www' except: srv = '/var/www'