#!/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