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
514 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
virtualenv venv
. venv/bin/activate
pip3 install prometheus_client psycopg2 datetime
# Start service
systemctl restart prometheus-odoo-license-exporter
EOF