#!/bin/sh # mkosi postinst: install the vetting-agent binary and its systemd unit # into the image. The binary must already be built for linux-amd64 at # repo root under bin/vetting-agent.linux-amd64 (the top-level Makefile # does this via `make agent-linux`). set -eu AGENT_BIN="${SRCDIR:-..}/bin/vetting-agent.linux-amd64" install -D -m 0755 "$AGENT_BIN" "$BUILDROOT/usr/local/sbin/vetting-agent" install -D -m 0644 "$SRCDIR/mkosi.skeleton/etc/systemd/system/vetting-agent.service" \ "$BUILDROOT/etc/systemd/system/vetting-agent.service" ln -sf /etc/systemd/system/vetting-agent.service \ "$BUILDROOT/etc/systemd/system/multi-user.target.wants/vetting-agent.service"