#!/bin/sh -e cat /etc/prometheus/prometheus.yml > /tmp/prometheus.yml cat /etc/prometheus/weave-cortex.yml | \ sed "s@#password: #@password: '$WEAVE_TOKEN'@g" > /tmp/weave-cortex.yml #JOBS=mongo-exporter:9111 redis-exporter:9112 if [ ${JOBS+x} ]; then for job in $JOBS do echo "adding job $job" SERVICE=$(echo "$job" | cut -d":" -f1) PORT=$(echo "$job" | cut -d":" -f2) cat >>/tmp/prometheus.yml <>/tmp/weave-cortex.yml <