6
0
Fork 0

Adapt odoo-license-exporter for debian.

This commit is contained in:
Joachim Desroches 2021-09-16 17:41:57 +02:00
parent 4fc8f7758d
commit 8a2186b907
No known key found for this signature in database
GPG key ID: 6778C9C29C02D691
2 changed files with 7 additions and 3 deletions

View file

@ -10,10 +10,10 @@ cd /opt/prometheus-odoo-license-exporter
curl "$VCS_URL" -o prometheus-odoo-license-exporter
# Install virtualenv and dependencies
virtualenv venv
python3 -m venv venv
. venv/bin/activate
pip3 install prometheus_client psycopg2 datetime
pip3 install prometheus_client psycopg2-binary datetime
# Start service
systemctl restart prometheus-odoo-license-exporter

View file

@ -5,9 +5,13 @@ os=$(cat "${__global:?}/explorer/os")
mkdir -p "${__object:?}/files"
case "$os" in
debian|ubuntu)
__package python3-virtualenv
__package python3-venv
__package curl
# Required for psycopg2
__package libpq-dev
__package build-essential
__package libpython3-dev
"${__type:?}/files/prometheus-odoo-license-exporter.service.sh" \
> "${__object:?}/files/prometheus-odoo-license-exporter.service"