hthd@.service 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. # hthd instance unit: one serial controller = one process.
  2. # Usage: systemctl enable --now hthd@controller0.service
  3. # Config: /etc/hth/hthd@%i.yaml
  4. [Unit]
  5. Description=hth high-temperature hood daemon (%i)
  6. Documentation=file:///etc/hth/hthd@%i.yaml
  7. After=systemd-tmpfiles-setup.service
  8. Requires=systemd-tmpfiles-setup.service
  9. [Service]
  10. Type=notify
  11. NotifyAccess=main
  12. User=hth
  13. Group=hth
  14. SupplementaryGroups=dialout hth-observe hth-control
  15. Restart=on-failure
  16. RestartSec=2s
  17. WatchdogSec=30
  18. UMask=0007
  19. NoNewPrivileges=true
  20. PrivateTmp=true
  21. ProtectHome=true
  22. ProtectSystem=strict
  23. ReadWritePaths=/run/hth /var/lib/hth
  24. ReadOnlyPaths=/etc/hth
  25. WorkingDirectory=/var/lib/hth
  26. ExecStartPre=/usr/local/bin/hthd --check-config --config /etc/hth/hthd@%i.yaml
  27. ExecStart=/usr/local/bin/hthd --config /etc/hth/hthd@%i.yaml
  28. TimeoutStopSec=15
  29. LimitNOFILE=4096
  30. LockPersonality=true
  31. RestrictSUIDSGID=true
  32. RestrictNamespaces=true
  33. SystemCallArchitectures=native
  34. ProtectClock=true
  35. ProtectKernelTunables=true
  36. ProtectKernelModules=true
  37. ProtectControlGroups=true
  38. # Do not set PrivateDevices=true: it hides the serial node.
  39. RestrictAddressFamilies=AF_UNIX
  40. [Install]
  41. WantedBy=multi-user.target