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
Signed by untrusted user who does not match committer: jdesroches
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 curl "$VCS_URL" -o prometheus-odoo-license-exporter
# Install virtualenv and dependencies # Install virtualenv and dependencies
virtualenv venv python3 -m venv venv
. venv/bin/activate . venv/bin/activate
pip3 install prometheus_client psycopg2 datetime pip3 install prometheus_client psycopg2-binary datetime
# Start service # Start service
systemctl restart prometheus-odoo-license-exporter systemctl restart prometheus-odoo-license-exporter

View File

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