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_odoo_license_e.../gencode-remote

21 lines
530 B
Bash
Executable File

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