aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server/Program.cs
diff options
context:
space:
mode:
authorPatrick Barron <18354464+barronpm@users.noreply.github.com>2020-07-23 23:50:12 +0000
committerGitHub <noreply@github.com>2020-07-23 23:50:12 +0000
commit3d69cea1c9724210c31467bde5204c2649a23992 (patch)
treea73e7b774b0f5a7e074dedbc62ba4bf555bd3222 /Jellyfin.Server/Program.cs
parent5f67ba4d7087d7a0cad37fc9e2db212340076d12 (diff)
parent845ee21ddce8ed91d8c3c1463d0d7a06bb769635 (diff)
Merge branch 'master' into displaypreferences-efcore
Diffstat (limited to 'Jellyfin.Server/Program.cs')
-rw-r--r--Jellyfin.Server/Program.cs15
1 files changed, 15 insertions, 0 deletions
diff --git a/Jellyfin.Server/Program.cs b/Jellyfin.Server/Program.cs
index ef3ebe90c..444a91c02 100644
--- a/Jellyfin.Server/Program.cs
+++ b/Jellyfin.Server/Program.cs
@@ -343,6 +343,21 @@ namespace Jellyfin.Server
}
}
}
+
+ // Bind to unix socket (only on OSX and Linux)
+ if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
+ {
+ // TODO: allow configuration of socket path
+ var socketPath = $"{appPaths.DataPath}/socket.sock";
+ // Workaround for https://github.com/aspnet/AspNetCore/issues/14134
+ if (File.Exists(socketPath))
+ {
+ File.Delete(socketPath);
+ }
+
+ options.ListenUnixSocket(socketPath);
+ _logger.LogInformation("Kestrel listening to unix socket {SocketPath}", socketPath);
+ }
})
.ConfigureAppConfiguration(config => config.ConfigureAppConfiguration(commandLineOpts, appPaths, startupConfig))
.UseSerilog()