mirror of
https://github.com/immense/Remotely.git
synced 2025-10-26 11:27:15 +00:00
23 lines
698 B
C#
23 lines
698 B
C#
using Microsoft.Extensions.DependencyInjection;
|
|
using Remotely.Desktop.Core;
|
|
using Remotely.Desktop.Core.Interfaces;
|
|
using Remotely.Desktop.Core.Services;
|
|
using Remotely.Shared.Utilities;
|
|
using System;
|
|
using System.Diagnostics;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Remotely.Desktop.Linux.Services
|
|
{
|
|
public class ShutdownServiceLinux : IShutdownService
|
|
{
|
|
public async Task Shutdown()
|
|
{
|
|
Logger.Debug($"Exiting process ID {Process.GetCurrentProcess().Id}.");
|
|
var casterSocket = ServiceContainer.Instance.GetRequiredService<CasterSocket>();
|
|
await casterSocket.DisconnectAllViewers();
|
|
Environment.Exit(0);
|
|
}
|
|
}
|
|
}
|