feat: implement RadiusService for guest management and AccountEnforcementService for session monitoring
Build and Push Docker Image to Gitea Container Registry / build-and-push (push) Successful in 1m10s

This commit is contained in:
Tygozwolle
2026-07-24 19:04:02 +02:00
parent 926d2a1fc5
commit 4b8e4639e5
2 changed files with 24 additions and 4 deletions
@@ -132,12 +132,22 @@ public class AccountEnforcementService : BackgroundService
}
};
process.Start();
string output = await process.StandardOutput.ReadToEndAsync(ct);
string error = await process.StandardError.ReadToEndAsync(ct);
await process.WaitForExitAsync(ct);
_logger.LogInformation("Sent RADIUS Disconnect-Request to NAS {NasIp} for user {Username} (MAC: {Mac})", session.NasIpAddress, profile.Username, session.CallingStationId);
if (process.ExitCode == 0)
{
_logger.LogInformation("Sent RADIUS Disconnect-Request to NAS {NasIp} for user {Username} (MAC: {Mac}). Response: {Output}", session.NasIpAddress, profile.Username, session.CallingStationId, output);
}
else
{
_logger.LogWarning("Failed RADIUS Disconnect-Request to NAS {NasIp}. Exit Code: {Code}, Error: {Error}, Output: {Output}", session.NasIpAddress, process.ExitCode, error, output);
}
}
catch (Exception ex)
{
_logger.LogError(ex, "Failed to send RADIUS Disconnect-Request to NAS {NasIp}", session.NasIpAddress);
_logger.LogError(ex, "Exception sending RADIUS Disconnect-Request to NAS {NasIp}", session.NasIpAddress);
}
}