hthd.service 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. [Unit]
  2. Description=hth high-temperature hood device daemon
  3. Documentation=file:///etc/hth/hthd.yaml
  4. After=systemd-tmpfiles-setup.service
  5. Wants=systemd-tmpfiles-setup.service
  6. [Service]
  7. Type=notify
  8. NotifyAccess=main
  9. User=hth
  10. Group=hth
  11. SupplementaryGroups=dialout hth-observe hth-control
  12. Restart=on-failure
  13. RestartSec=2s
  14. WatchdogSec=30
  15. # systemd WatchdogSec is process liveness only. hthd sends sd_notify
  16. # READY=1 and WATCHDOG=1. It does not replace Control Lease or FPGA SET_ALL watchdog.
  17. # Runtime directories come from tmpfiles.d/hth.conf (setgid observe/control).
  18. # Do not use RuntimeDirectory=hth 0750 hth:hth: that blocks hth-observe.
  19. UMask=0007
  20. NoNewPrivileges=true
  21. PrivateTmp=true
  22. ProtectHome=true
  23. ProtectSystem=strict
  24. ReadWritePaths=/run/hth /var/lib/hth
  25. ReadOnlyPaths=/etc/hth
  26. WorkingDirectory=/var/lib/hth
  27. ExecStartPre=/usr/local/bin/hthd --check-config --config /etc/hth/hthd.yaml
  28. ExecStart=/usr/local/bin/hthd --config /etc/hth/hthd.yaml
  29. TimeoutStopSec=15
  30. LimitNOFILE=4096
  31. LockPersonality=true
  32. RestrictSUIDSGID=true
  33. RestrictNamespaces=true
  34. SystemCallArchitectures=native
  35. ProtectClock=true
  36. ProtectKernelTunables=true
  37. ProtectKernelModules=true
  38. ProtectControlGroups=true
  39. # Do not set PrivateDevices=true: it hides the serial node.
  40. # RestrictAddressFamilies=AF_UNIX: gRPC UDS + sd_notify only. No TCP.
  41. RestrictAddressFamilies=AF_UNIX
  42. [Install]
  43. WantedBy=multi-user.target