From 79097b522fa33fd25e97d10149a27d9d22aa430a Mon Sep 17 00:00:00 2001 From: u Date: Mon, 29 May 2023 19:58:50 -0400 Subject: fossil-test service will use generated key --- src/fossil-test@.service | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/fossil-test@.service b/src/fossil-test@.service index c1ad063..8498733 100644 --- a/src/fossil-test@.service +++ b/src/fossil-test@.service @@ -3,10 +3,16 @@ Description = Test Endofossil by attempting a clone [Service] Type = oneshot +DynamicUser = yes +User = fossil-test-user-%i +PrivateUsers = yes RuntimeDirectory = fossil-test-%i WorkingDirectory = /run/fossil-test-%i +Environment = HOME=/run/fossil-test-%i +BindPaths = /run/fossil-test-%i:/root + ExecStart = sh -xc 'mkdir .ssh' -ExecStart = sh -xc 'ssh-keygen -t ed25519 -f .ssh/id_ed25519 -N ""' -ExecStart = sh -xc 'HOME=. ssh %i@localhost fossil test-http src/fossil/db' -ExecStart = sh -xc 'HOME=. fossil clone ssh://%i@localhost/src/fossil/db db~$(date -Ins).fossil' +ExecStart = sh -xc 'fakeroot ssh-keygen -t ed25519 -f .ssh/id_ed25519 -N ""' +ExecStart = sh -xc 'fakeroot ssh -o UserKnownHostsFile=.ssh/known_hosts -o StrictHostKeyChecking=accept-new -i .ssh/id_ed25519 %i@localhost fossil test-http src/fossil/db' +ExecStart = sh -xc 'fakeroot fossil clone ssh://%i@localhost/src/fossil/db db~$(date -Ins).fossil' -- cgit v1.2.3