diff options
author | u <u@billy> | 2023-05-29 07:39:55 -0400 |
---|---|---|
committer | u <u@billy> | 2023-05-29 07:46:50 -0400 |
commit | d7a855170d5c11b080ba62d74e583903b708ef37 (patch) | |
tree | 6d4ccb89f380d633125a269655502ef5f0aa3458 /Makefile | |
parent | 3f7ac1f42b1ae91ec7ea07c0fae562cccd794e0b (diff) |
Remove references to user "u". Uses $SUDO_USER.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -34,6 +34,11 @@ work: | |||
34 | work/.fslckout: | work $(fossil_database) | 34 | work/.fslckout: | work $(fossil_database) |
35 | cd work && fossil open ../$(fossil_database) | 35 | cd work && fossil open ../$(fossil_database) |
36 | else | 36 | else |
37 | ifdef SUDO_USER | ||
38 | THE_USER=$(SUDO_USER) | ||
39 | else | ||
40 | $(error "you must define THE_USER") | ||
41 | endif | ||
37 | unitdir = /etc/systemd/system | 42 | unitdir = /etc/systemd/system |
38 | unit_files = $(addprefix src/fossil-user,@.service .socket) | 43 | unit_files = $(addprefix src/fossil-user,@.service .socket) |
39 | units = $(filter-out %@.service,$(notdir $(unit_files))) | 44 | units = $(filter-out %@.service,$(notdir $(unit_files))) |
@@ -42,7 +47,8 @@ bindir = /usr/local/bin | |||
42 | 47 | ||
43 | default: install start follow | 48 | default: install start follow |
44 | install: | 49 | install: |
45 | install -t /etc/ssh/ -- src/user-d.AnonymousForceCommand src/user-d.AuthorizedKeysCommand | 50 | install -t /etc/ssh/ -- src/AuthorizedKeysCommand |
51 | install -T -- src/AnonymousForceCommand /etc/ssh/user-$(THE_USER).AnonymousForceCommand | ||
46 | install -m644 -t /etc/ssh/sshd_config.d -- src/fossil-user.conf | 52 | install -m644 -t /etc/ssh/sshd_config.d -- src/fossil-user.conf |
47 | install -m644 -t $(unitdir) -- $(unit_files) | 53 | install -m644 -t $(unitdir) -- $(unit_files) |
48 | install -t $(bindir) -- $(executables) | 54 | install -t $(bindir) -- $(executables) |