21 lines
500 B
Plaintext
21 lines
500 B
Plaintext
|
#!/bin/sh
|
||
|
|
||
|
VCS_TAG=$(cat "${__object:?}/parameter/version")
|
||
|
VCS_URL="https://code.recycled.cloud/e-Durable/prometheus-borgbackup-exporter/raw/tag/$VCS_TAG/prometheus-borgbackup-exporter"
|
||
|
|
||
|
cat << EOF
|
||
|
cd /opt/prometheus-borgbackup-exporter
|
||
|
|
||
|
# Fetch sources.
|
||
|
curl "$VCS_URL" -o prometheus-borgbackup-exporter
|
||
|
|
||
|
# Install virtualenv and dependencies.
|
||
|
virtualenv venv
|
||
|
. venv/bin/activate
|
||
|
pip install prometheus_client
|
||
|
pip install dateutils
|
||
|
|
||
|
# Start service
|
||
|
service prometheus-borgbackup-exporter start
|
||
|
EOF
|