-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpre-start.sh
19 lines (16 loc) · 1.01 KB
/
pre-start.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/with-contenv bash
set -e
args='--file-mark **/*.sh:type=text-template --file-mark **/*.conf:type=text-template --file-mark **/*.json:type=text-template --file-mark services.d/lunner/run.sh:path=services.d/lunner/run --file-mark services.d/telegraf_disk/run.sh:path=services.d/telegraf_disk/run --file-mark services.d/telegraf_cpu/run.sh:path=services.d/telegraf_cpu/run --file-mark services.d/telegraf/run.sh:path=services.d/telegraf/run --file-mark services.d/azure_metrics_exporter/run.sh:path=services.d/azure_metrics_exporter/run --file-mark services.d/aliyun_exporter/run.sh:path=services.d/aliyun_exporter/run --output-files /etc'
if [ -f /config-iaas.yml ]; then
ytt -f /templates \
--data-value "lunner_id=$(hostname)" \
--data-value-yaml "config=$(cat /config.yml)" \
--data-value-yaml "iaas_config=$(cat /config-iaas.yml)" \
${args}
else
ytt -f /templates \
--data-value "lunner_id=$(hostname)" \
--data-value "id=$(hostname)"
--data-value-yaml "config=$(cat /config.yml)" \
${args}
fi