Development

This commit is contained in:
Matthew Grotke 2026-05-26 00:58:51 -04:00
parent 222f43feff
commit 3c7b13e98a
3 changed files with 21 additions and 6 deletions

View file

@ -37,6 +37,7 @@ DASHB_LOCK_FILE = SCRIPT_DIR / ".dashboard-lock"
DASHB_PENDING_FILE = SCRIPT_DIR / ".dashboard-pending"
DASHB_SCRIPT_FILE = SCRIPT_DIR / "do_dashboard_queue.sh"
HEALTH_FILE = SCRIPT_DIR / ".health"
SNAPSHOTS_DIR = SCRIPT_DIR / ".snapshots"
# Dashboard systemd timer
DASHB_TIMER_NAME = f"{PRODUCT_NAME}-dashboard-queue"
@ -347,12 +348,15 @@ def setup_docker_compose(reuse_config=False):
def create_dotfiles():
dir_stat = SCRIPT_DIR.stat()
uid, gid = dir_stat.st_uid, dir_stat.st_gid
if not SNAPSHOTS_DIR.exists():
SNAPSHOTS_DIR.mkdir()
os.chown(SNAPSHOTS_DIR, uid, gid)
for f in (DASHB_QUEUE_FILE, DASHB_DONE_FILE, DASHB_LAST_RUN_FILE, DASHB_LOCK_FILE, DASHB_PENDING_FILE, HEALTH_FILE):
if not f.exists():
f.touch()
# chown to the routlin dir owner so the timer can write
stat = SCRIPT_DIR.stat()
os.chown(f, stat.st_uid, stat.st_gid)
os.chown(f, uid, gid)
# ===================================================================