pcp/root/usr/libexec/container-setup

11 lines
442 B
Bash
Executable file

#!/bin/sh -eu
export HOST_MOUNT=${HOST_MOUNT:-''}
export REDIS_SERVERS=${REDIS_SERVERS:-'localhost:6379'}
mkdir /etc/systemd/system/pmcd.service.d
envsubst '$HOST_MOUNT' < /usr/share/container-scripts/pcp/10-host_mount.conf.template > /etc/systemd/system/pmcd.service.d/10-host_mount.conf
envsubst '$REDIS_SERVERS' < /usr/share/container-scripts/pcp/pmproxy.conf.template > /etc/pcp/pmproxy/pmproxy.conf
echo Starting systemd...
exec "$@"