summaryrefslogtreecommitdiff
path: root/src/fossil-test@.service
blob: 1bdd39f0aabfcdfe7ddf4171303a66bd8c794916 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
[Unit]
Description = Endofossil Test: Clone over SSH using fresh identity

[Service]
Type = oneshot
PrivateUsers = yes
DynamicUser = yes

User = fossil-test-user-%i
RuntimeDirectory = fossil-test-%i
BindPaths = /run/fossil-test-%i:/.ssh
Environment = HOME=/run/fossil-test-%i
WorkingDirectory = /run/fossil-test-%i

ExecStart = sh -exc '\
! touch /test.file; \
ln -s . .ssh; \
mkdir .ssh/known_hosts.d; \
ssh-keygen -t ed25519 -f .ssh/id_ed25519 -N ""; \
ssh -o BatchMode=yes -o StrictHostKeyChecking=accept-new -- %i@localhost :; \
ssh -o BatchMode=yes -o StrictHostKeyChecking=yes        -- %i@localhost uptime; \
cd .ssh; \
fossil clone ssh://%i@localhost/src/fossil/db db~$(date -Ins).fossil; \
'