26 lines
664 B
SYSTEMD
26 lines
664 B
SYSTEMD
|
|
[Unit]
|
||
|
|
Description=Prometheus exporter for PTP grandmaster
|
||
|
|
After=network-online.target ptp4l-gm.service phc2sys-gm.service chrony.service
|
||
|
|
Wants=network-online.target
|
||
|
|
|
||
|
|
[Service]
|
||
|
|
Type=simple
|
||
|
|
User=ptp-exporter
|
||
|
|
Group=ptp-exporter
|
||
|
|
SupplementaryGroups=systemd-journal
|
||
|
|
RuntimeDirectory=ptp-exporter
|
||
|
|
RuntimeDirectoryMode=0750
|
||
|
|
ExecStart=/opt/ptp-exporter/venv/bin/python /opt/ptp-exporter/linux_ptp_exporter.py \
|
||
|
|
--role grandmaster \
|
||
|
|
--listen 0.0.0.0 \
|
||
|
|
--port 9559 \
|
||
|
|
--uds /var/run/ptp4lro \
|
||
|
|
--chrony \
|
||
|
|
--ptp4l-service ptp4l-gm.service \
|
||
|
|
--phc2sys-service phc2sys-gm.service
|
||
|
|
Restart=on-failure
|
||
|
|
RestartSec=3
|
||
|
|
|
||
|
|
[Install]
|
||
|
|
WantedBy=multi-user.target
|