Commit forgotten patch to prometheus-yoctotemp-exporter
This commit is contained in:
parent
7af78934f0
commit
e22c50a5b2
1 changed files with 15 additions and 13 deletions
|
@ -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
|
||||
|
|
Reference in a new issue