Alberto Planas Dominguez
14b9396b54
- Rename the published image to "keylime-agent" - Rename the volumes and container default name, and the configuration file under "keylime-agent-XXXX" OBS-URL: https://build.opensuse.org/request/show/1031952 OBS-URL: https://build.opensuse.org/package/show/devel:microos:containers/rust-keylime-image?expand=0&rev=4
20 lines
437 B
Bash
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
|