mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-01 21:38:27 +01:00
starting point towards running as a service
This commit is contained in:
30
MediaBrowser.ServerApplication/BackgroundService.cs
Normal file
30
MediaBrowser.ServerApplication/BackgroundService.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using System.ServiceProcess;
|
||||
|
||||
namespace MediaBrowser.ServerApplication
|
||||
{
|
||||
public class BackgroundService : ServiceBase
|
||||
{
|
||||
public BackgroundService()
|
||||
{
|
||||
CanPauseAndContinue = false;
|
||||
CanHandleSessionChangeEvent = true;
|
||||
CanStop = false;
|
||||
CanShutdown = true;
|
||||
ServiceName = "Media Browser";
|
||||
}
|
||||
|
||||
protected override void OnSessionChange(SessionChangeDescription changeDescription)
|
||||
{
|
||||
base.OnSessionChange(changeDescription);
|
||||
}
|
||||
|
||||
protected override void OnStart(string[] args)
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnShutdown()
|
||||
{
|
||||
base.OnShutdown();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user