systemd.unit 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. [Unit]
  2. Description=decentralized network whois daemon
  3. Documentation=https://codeberg.org/mark22k/dnet-whois
  4. After=network.target
  5. [Service]
  6. RestrictAddressFamilies=AF_INET AF_INET6
  7. PrivateTmp=yes
  8. DeviceAllow=
  9. PrivateDevices=true
  10. PrivateMounts=true
  11. ProtectClock=true
  12. ProtectControlGroups=true
  13. ProtectKernelLogs=true
  14. ProtectKernelModules=true
  15. ProtectKernelTunables=true
  16. ProtectProc=noaccess
  17. ProtectSystem=true
  18. ProtectHome=read-only
  19. RestrictSUIDSGID=true
  20. SystemCallArchitectures=native
  21. SystemCallFilter=~@clock
  22. SystemCallFilter=~@debug
  23. SystemCallFilter=~@module
  24. SystemCallFilter=~@mount
  25. SystemCallFilter=~@raw-io
  26. SystemCallFilter=~@reboot
  27. SystemCallFilter=~@swap
  28. SystemCallFilter=~@privileged
  29. SystemCallFilter=~@resources
  30. SystemCallFilter=~@cpu-emulation
  31. SystemCallFilter=~@obsolete
  32. RestrictNamespaces=true
  33. RestrictRealtime=true
  34. LockPersonality=true
  35. MemoryDenyWriteExecute=true
  36. RemoveIPC=true
  37. UMask=600
  38. ProtectHostname=true
  39. ProcSubset=pid
  40. PermissionsStartOnly=true
  41. LimitNOFILE=1048576
  42. LimitNPROC=512
  43. CapabilityBoundingSet=CAP_NET_BIND_SERVICE
  44. AmbientCapabilities=CAP_NET_BIND_SERVICE
  45. NoNewPrivileges=true
  46. User=marek
  47. Group=marek
  48. ExecStart=/usr/bin/ruby /home/dnet-whois/dnet-whois/lib/main.rb /home/dnet-whois/config.json
  49. ExecReload=/bin/kill -SIGUSR1 $MAINPID
  50. Restart=on-failure
  51. [Install]
  52. WantedBy=multi-user.target