squidstats.service 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. [Unit]
  2. Description=SquidStats – Squid Proxy Statistics Dashboard
  3. Documentation=https://github.com/kaelthasmanu/SquidStats
  4. After=network.target
  5. Wants=network.target
  6. [Service]
  7. Type=simple
  8. User=squidstats
  9. Group=squidstats
  10. WorkingDirectory=/opt/SquidStats/app
  11. ExecStart=/opt/SquidStats/venv/bin/python3 /opt/SquidStats/app/app.py
  12. Restart=on-failure
  13. RestartSec=5
  14. # Configuration file (generated by postinst from /opt/SquidStats/app/.env)
  15. EnvironmentFile=/opt/SquidStats/app/.env
  16. # Inherit squid log group so the service can read access logs
  17. SupplementaryGroups=proxy
  18. # Security hardening
  19. PrivateTmp=true
  20. ProtectSystem=full
  21. NoNewPrivileges=true
  22. CapabilityBoundingSet=
  23. # /etc/squid may contain keytabs and other credentials. This unit deliberately
  24. # does not grant the web process a writable exception there. The Kerberos UI
  25. # remains preview/manual-only unless a deployment installs a separate,
  26. # narrowly scoped and audited privileged write mechanism.
  27. Environment=SQUIDSTATS_SQUID_CONFIG_WRITE_MODE=manual
  28. # Resource limits
  29. MemoryMax=2G
  30. TimeoutStartSec=60
  31. TimeoutStopSec=15
  32. # Logging
  33. StandardOutput=journal
  34. StandardError=journal
  35. SyslogIdentifier=squidstats
  36. [Install]
  37. WantedBy=multi-user.target