aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2020-12-09 20:28:46 +0100
committerGuilhem Moulin <guilhem@fripost.org>2020-12-09 20:28:46 +0100
commit61e4ad1347f51a84400cbf87633cc99f657f9ad7 (patch)
tree793203c0dd6f829facb67afb10db87bc86de44a8 /Makefile
parente751a1e0215342be52da2c086ad2e7bc8901229e (diff)
Make unprivileged user/group for the internal client resp. webserver configurable.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 11 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index a4098de..afc5c71 100644
--- a/Makefile
+++ b/Makefile
@@ -35,6 +35,11 @@ mandir ?= $(datarootdir)/man
man1dir ?= $(mandir)/man1
man8dir ?= $(mandir)/man8
+lacme_www_user ?= www-data
+lacme_www_group ?= www-data
+lacme_client_user ?= nobody
+lacme_client_group ?= nogroup
+
$(BUILDDIR)/%: %
mkdir -pv -- $(dir $@)
cp --no-dereference --preserve=mode,links,xattr -vfT -- "$<" "$@"
@@ -43,7 +48,12 @@ $(BUILDDIR)/%: %
s#@@libexecdir@@#$(libexecdir)#g; \
s#@@datadir@@#$(datadir)#g; \
s#@@runstatedir@@#$(runstatedir)#g; \
- s#@@sysconfdir@@#$(sysconfdir)#g;" -- "$@"
+ s#@@sysconfdir@@#$(sysconfdir)#g; \
+ s#@@lacme_www_user@@#$(lacme_www_user)#g; \
+ s#@@lacme_www_group@@#$(lacme_www_group)#g; \
+ s#@@lacme_client_user@@#$(lacme_client_user)#g; \
+ s#@@lacme_client_group@@#$(lacme_client_group)#g;" \
+ -- "$@"
install: all
install -m0644 -vDt $(sysconfdir)/lacme $(BUILDDIR)/config/*.conf $(BUILDDIR)/snippets/*.conf