[Unit] Description=Foxhunt Risk Management Service After=foxhunt-core.service Requires=foxhunt-core.service Documentation=https://github.com/foxhunt/docs [Service] Type=exec User=foxhunt Group=foxhunt WorkingDirectory=/opt/foxhunt ExecStart=/opt/foxhunt/bin/foxhunt-risk ExecReload=/bin/kill -HUP $MAINPID ExecStop=/bin/kill -TERM $MAINPID TimeoutStopSec=30 Restart=always RestartSec=5 # Critical path for risk calculations CPUAffinity=10-11 SchedulingPolicy=fifo SchedulingPriority=85 # Memory optimization for risk calculations MemoryAccounting=yes MemoryMax=4G LimitNOFILE=65536 LimitMEMLOCK=infinity # Security NoNewPrivileges=true ProtectSystem=strict ProtectHome=true ProtectKernelTunables=true ProtectKernelModules=true ProtectControlGroups=true ReadWritePaths=/opt/foxhunt/data /var/log/foxhunt /tmp # Environment Environment=RUST_LOG=info Environment=FOXHUNT_CONFIG=/opt/foxhunt/config/production.toml Environment=FOXHUNT_CORE_ENDPOINT=http://localhost:8080 Environment=FOXHUNT_ENV=production [Install] WantedBy=multi-user.target