From 570ed1973acb10b84248d8433dd9b836cdac8f15 Mon Sep 17 00:00:00 2001 From: Cyrille L Date: Mon, 28 Nov 2022 11:46:39 +0100 Subject: [PATCH] domain: local db goes to USER .local folder --- src/var/lib/tyto/program/domain.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/var/lib/tyto/program/domain.py b/src/var/lib/tyto/program/domain.py index 02366fe..645e20c 100644 --- a/src/var/lib/tyto/program/domain.py +++ b/src/var/lib/tyto/program/domain.py @@ -22,9 +22,12 @@ #======# import sys, os, subprocess, datetime import check, log - + +# Get user dir +home_dir = os.path.expanduser('~') + # In Tyto DB dir -tyto_db = '/var/lib/tyto/db/' +tyto_db = '%s/.local/tyto'%home_dir tyto_domains = '%sdomains.conf'%tyto_db # In Tyto log dir @@ -279,7 +282,9 @@ def domain_form(): # 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 except: srv = '/var/www'