rust-keylime-image/rust-keylime-configure.sh
Fabian Vogt adc93d93ee Accepting request 1030207 from home:aplanas:branches:devel:BCI:Tumbleweed
- Drop rust-keylime-start.sh CMD script
- Replace "-a" with "&&" in the configure script
- Drop docker-entrypoint.sh script
- Add README documentation

OBS-URL: https://build.opensuse.org/request/show/1030207
OBS-URL: https://build.opensuse.org/package/show/devel:microos:containers/rust-keylime-image?expand=0&rev=2
2022-10-20 14:32:00 +00:00

20 lines
437 B
Bash

#!/bin/sh
set -e
[ -n "$1" ] && UUID="$1"
[ -n "$2" ] && REMOTE_IP="$2"
if [ -n "$UUID" ] && [ "$UUID" != "<UUID>" ] && [ -n "$REMOTE_IP" ] && [ "$REMOTE_IP" != "<REMOTE_IP>" ]; then
mkdir -p /var/lib/keylime/cv_ca
mkdir -p /etc/keylime/agent.conf.d
cat <<EOF > /etc/keylime/agent.conf.d/agent.conf
[agent]
uuid = "$UUID"
registrar_ip = "$REMOTE_IP"
revocation_notification_ip = "$REMOTE_IP"
run_as = "root:root"
EOF
fi