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.../files/prometheus-odoo-license-exp...

20 lines
441 B
Bash
Executable File

#!/bin/sh
DBNAME=$(cat "${__object:?}/parameter/dbname")
cat << EOF
[Unit]
Description=e-Durable's Prometheus Odoo License Expiration exporter
After=network.target
Requires=postgresql.service
After=postgresql.service
[Service]
Type=simple
User=odoo
ExecStart=/opt/prometheus-odoo-license-exporter/venv/bin/python /opt/prometheus-odoo-license-exporter/prometheus-odoo-license-exporter ${DBNAME:?}
[Install]
WantedBy=multi-user.target
EOF