2022-04-25 19:12:06 +00:00
|
|
|
[Unit]
|
|
|
|
Description=Register Grafana Dashboard for %I
|
|
|
|
Wants=grafana.service
|
|
|
|
After=grafana.service
|
|
|
|
ConditionPathExists=%E/coreos-home-server/%i/service/%p.json
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
Type=oneshot
|
|
|
|
RemainAfterExit=true
|
|
|
|
SyslogIdentifier=%N
|
2023-12-04 10:44:21 +00:00
|
|
|
Environment=DASHBOARD_CONF=%E/coreos-home-server/%i/service/%p.json
|
2022-04-25 19:12:06 +00:00
|
|
|
ExecStartPre=/bin/podman exec grafana mkdir -p /var/lib/grafana/dashboards
|
2023-12-04 10:44:21 +00:00
|
|
|
ExecStart=/bin/podman cp ${DASHBOARD_CONF} grafana:/var/lib/grafana/dashboards/%i.json
|
2022-04-25 19:12:06 +00:00
|
|
|
ExecStop=/bin/podman exec grafana rm -f /var/lib/grafana/dashboards/%i.json
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|