squidstats.service 563 B

1234567891011121314151617181920212223242526
  1. [Unit]
  2. Description=SquidStats Web Application
  3. After=network.target
  4. [Service]
  5. Type=simple
  6. User=root
  7. WorkingDirectory=__INSTALL_DIR__
  8. ExecStart=__INSTALL_DIR__/venv/bin/python3 __INSTALL_DIR__/app.py
  9. Restart=always
  10. RestartSec=5
  11. EnvironmentFile=__INSTALL_DIR__/.env
  12. Environment=PATH=__INSTALL_DIR__/venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
  13. # Resource limits
  14. MemoryLimit=2048M
  15. TimeoutStartSec=30
  16. TimeoutStopSec=10
  17. # Logging
  18. StandardOutput=journal
  19. StandardError=journal
  20. SyslogIdentifier=squidstats
  21. [Install]
  22. WantedBy=multi-user.target