From 1b20816e7bbfd7e0251bc10589ccfe59ea1dd1ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Pant=C5=AF=C4=8Dek?= Date: Fri, 4 Apr 2025 10:28:54 +0200 Subject: [PATCH] Conditional frontend build + add user/group options. --- backend/Makefile | 2 +- backend/brminv.scm | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/backend/Makefile b/backend/Makefile index b06262a..2581480 100644 --- a/backend/Makefile +++ b/backend/Makefile @@ -26,7 +26,7 @@ frontend.o: frontend.import.scm frontend.import.scm: frontend.scm .PHONY: frontend.scm frontend.scm: - cd ../frontend && npm run build && cd ../backend && csi -b -q ../tools/schemify-tree.scm -- ../frontend/dist frontend frontend-lookup + cd ../frontend && (if [ -d src ] ; then npm run build ; fi ) && cd ../backend && csi -b -q ../tools/schemify-tree.scm -- ../frontend/dist frontend frontend-lookup brminv.o: $(BRMINV_SOURCES) diff --git a/backend/brminv.scm b/backend/brminv.scm index 4911524..4a80137 100644 --- a/backend/brminv.scm +++ b/backend/brminv.scm @@ -62,7 +62,10 @@ (-certificate- cert)) (-k (key) "Private key" (-key- key)) - ) + (-u (user) "User to run as (if started as root)" + (-user- user)) + (-g (group) "Group to run as (if started as root)" + (-group- group))) (define ssl? (and (-certificate-) (-key-) #t)) (define port (or (-port-) (if ssl? 443 80)))