6
0
Fork 0

Commit forgotten patch to prometheus-yoctotemp-exporter

This commit is contained in:
Timothée Floure 2021-03-27 07:36:36 +01:00
parent 7af78934f0
commit e22c50a5b2
Signed by: tfloure
GPG Key ID: 4502C902C00A1E12
1 changed files with 15 additions and 13 deletions

View File

@ -4,17 +4,19 @@ VCS_TAG=$(cat "$__object/parameter/version")
VCS_URL="https://code.recycled.cloud/RecycledCloud/prometheus-yoctotemp-exporter/raw/tag/$VCS_TAG/prometheus-yoctotemp-exporter"
cat << EOF
cd /opt/prometheus-yoctotemp-exporter
# Fetch sources.
curl "$VCS_URL" -o prometheus-yoctotemp-exporter
# Install virtualenv and dependencies.
virtualenv -p python3 venv
. venv/bin/activate
pip install prometheus_client
pip install yoctopuce
# Start service
service prometheus-yoctotemp-exporter start
if [ ! -d /opt/prometheus-yoctotemp-exporter ]; then
cd /opt/prometheus-yoctotemp-exporter
# Fetch sources.
curl "$VCS_URL" -o prometheus-yoctotemp-exporter
# Install virtualenv and dependencies.
virtualenv -p python3 venv
. venv/bin/activate
pip install prometheus_client
pip install yoctopuce
# Start service
service prometheus-yoctotemp-exporter start
fi
EOF