mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-07-24 22:48:56 +02:00
Check service running before checking self restart
This commit is contained in:
parent
cabf2cdc1b
commit
71386f0ceb
|
@ -45,7 +45,11 @@ namespace MediaBrowser.ServerApplication
|
||||||
{
|
{
|
||||||
var options = new StartupOptions();
|
var options = new StartupOptions();
|
||||||
_isRunningAsService = options.ContainsOption("-service");
|
_isRunningAsService = options.ContainsOption("-service");
|
||||||
_canRestartService = CanRestartWindowsService();
|
|
||||||
|
if (_isRunningAsService)
|
||||||
|
{
|
||||||
|
_canRestartService = CanRestartWindowsService();
|
||||||
|
}
|
||||||
|
|
||||||
var currentProcess = Process.GetCurrentProcess();
|
var currentProcess = Process.GetCurrentProcess();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue