lynx-api.service 642 B

12345678910111213141516171819202122232425262728293031
  1. [Unit]
  2. Description=LYNX SHARE API (health, share links)
  3. After=network-online.target
  4. Wants=network-online.target
  5. [Service]
  6. User=lynx
  7. Group=lynx
  8. EnvironmentFile=/etc/lynx/lynx.env
  9. WorkingDirectory=/opt/lynx/app
  10. ExecStart=/usr/bin/python3 -s /opt/lynx/app/lynx_api.py
  11. Restart=always
  12. RestartSec=3
  13. MemoryMax=768M
  14. TasksMax=64
  15. Nice=5
  16. NoNewPrivileges=yes
  17. ProtectSystem=strict
  18. ProtectHome=yes
  19. PrivateTmp=yes
  20. PrivateDevices=yes
  21. ProtectKernelTunables=yes
  22. ProtectKernelModules=yes
  23. ProtectControlGroups=yes
  24. RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
  25. LockPersonality=yes
  26. ReadWritePaths=/var/lib/lynx
  27. UMask=0077
  28. [Install]
  29. WantedBy=multi-user.target