summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2023-05-29 16:01:20 -0400
committerAndrew Cady <d@jerkface.net>2023-05-29 16:08:46 -0400
commit365da8aa87daf436ce27605886a7041040639b5b (patch)
tree3b2bee00b372550190464c7b95f49beb5f13b1a2
parentd7a855170d5c11b080ba62d74e583903b708ef37 (diff)
remedy use of fixed username
-rw-r--r--Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 30850b8..1da4c43 100644
--- a/Makefile
+++ b/Makefile
@@ -45,6 +45,8 @@ units = $(filter-out %@.service,$(notdir $(unit_files)))
45executables = src/endofossil 45executables = src/endofossil
46bindir = /usr/local/bin 46bindir = /usr/local/bin
47 47
48SSH_USERNAME != if [ "$$SUDO_USER" ]; then echo "$$SUDO_USER"; else id -u; fi
49
48default: install start follow 50default: install start follow
49install: 51install:
50 install -t /etc/ssh/ -- src/AuthorizedKeysCommand 52 install -t /etc/ssh/ -- src/AuthorizedKeysCommand
@@ -54,7 +56,7 @@ install:
54 install -t $(bindir) -- $(executables) 56 install -t $(bindir) -- $(executables)
55 systemctl daemon-reload 57 systemctl daemon-reload
56test: install 58test: install
57 su - u -c 'fossil clone ssh://d@localhost/fossil/db db~$$(date -Ins).fossil' 59 su - u -c 'fossil clone ssh://$(SSH_USERNAME)@localhost/fossil/db db~$$(date -Ins).fossil'
58start stop restart status show: 60start stop restart status show:
59 systemctl $@ $(units) 61 systemctl $@ $(units)
60follow: 62follow: