blob: b1c9f88796be054a0f884651583c3c09879f4ae3 (
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
25
26
27
28
29
30
31
32
33
34
35
36
37
|
# IPC test between recent lacme-accountd(1) and ancient lacme(8) 0.5 from Debian buster
# (we don't try earlier versions as we need v2 support of the ACME API)
adduser --disabled-password \
--home /home/lacme-account \
--gecos "lacme account user" \
--quiet lacme-account
install -olacme-account -glacme-account -Ddm0700 -- ~lacme-account/.config/lacme
chown lacme-account: /etc/lacme/account.key
mv -f /usr/share/lacme/ca-certificates.crt /usr/share/lacme/ca-certificates.crt.back
cat >~lacme-account/.config/lacme/lacme-accountd.conf <<-EOF
privkey = file:/etc/lacme/account.key
EOF
echo "deb http://deb.debian.org/debian buster main" >>/etc/apt/sources.list
DEBIAN_FRONTEND="noninteractive" apt update
DEBIAN_FRONTEND="noninteractive" apt install -y --no-install-recommends \
--reinstall --allow-downgrades \
-oDPkg::Options::="--force-confdef" -oDPkg::Options::="--force-overwrite" \
lacme/buster
# restore staging environment
mv -f /usr/share/lacme/ca-certificates.crt.back /usr/share/lacme/ca-certificates.crt
SOCKET=~lacme-account/S.lacme
runuser -u lacme-account -- lacme-accountd --socket="$SOCKET" & PID=$!
sleep 1
sed -ri "s/^\[accountd]$/#&/" /etc/lacme/lacme.conf # https://bugs.debian.org/955767
lacme --socket="$SOCKET" account
lacme --socket="$SOCKET" newOrder
kill $PID
wait
# vim: set filetype=sh :
|