6
0
Fork 0
This repository has been archived on 2022-03-14. You can view files and clone it, but cannot push or open issues or pull requests.
cdist-recycledcloud/type/__prometheus_veeam_exporter/gencode-remote

21 lines
480 B
Bash
Executable File

#!/bin/sh
VCS_TAG=$(cat "${__object:?}/parameter/version")
VCS_URL="https://code.recycled.cloud/RecycledCloud/prometheus-veeam-exporter/raw/tag/v${VCS_TAG:?}/prometheus-veeam-exporter"
cat << EOF
cd /opt/prometheus-veeam-exporter
# Fetch sources
curl "$VCS_URL" -o prometheus-veeam-exporter
# Install virtualenv and dependencies
python3 -m venv venv
. venv/bin/activate
pip3 install prometheus_client datetime
# Start service
systemctl restart prometheus-veeam-exporter
EOF