From 365da8aa87daf436ce27605886a7041040639b5b Mon Sep 17 00:00:00 2001 From: Andrew Cady Date: Mon, 29 May 2023 16:01:20 -0400 Subject: remedy use of fixed username --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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))) executables = src/endofossil bindir = /usr/local/bin +SSH_USERNAME != if [ "$$SUDO_USER" ]; then echo "$$SUDO_USER"; else id -u; fi + default: install start follow install: install -t /etc/ssh/ -- src/AuthorizedKeysCommand @@ -54,7 +56,7 @@ install: install -t $(bindir) -- $(executables) systemctl daemon-reload test: install - su - u -c 'fossil clone ssh://d@localhost/fossil/db db~$$(date -Ins).fossil' + su - u -c 'fossil clone ssh://$(SSH_USERNAME)@localhost/fossil/db db~$$(date -Ins).fossil' start stop restart status show: systemctl $@ $(units) follow: -- cgit v1.2.3