Only try to shutdown server if actually running
This commit is contained in:
parent
18f2ffd92c
commit
cc574074b9
|
@ -114,8 +114,8 @@ namespace MediaBrowser.Installer
|
|||
var version = await GetPackageVersion();
|
||||
lblStatus.Content = string.Format("Downloading {0} (version {1})...", FriendlyName, version.versionStr);
|
||||
|
||||
// Now try and shut down the server if that is what we are installing
|
||||
if (PackageName == "MBServer")
|
||||
// Now try and shut down the server if that is what we are installing and it is running
|
||||
if (PackageName == "MBServer" && Process.GetProcessesByName("mediabrowser.serverapplication").Length != 0)
|
||||
{
|
||||
using (var client = new WebClient())
|
||||
{
|
||||
|
|
|
@ -79,6 +79,8 @@ namespace MediaBrowser.Uninstaller.Execute
|
|||
if (Product == "Server")
|
||||
{
|
||||
RemoveShortcut(Path.Combine(startMenu, "MB Dashboard.lnk"));
|
||||
if (Process.GetProcessesByName("mediabrowser.serverapplication").Length != 0)
|
||||
{
|
||||
using (var client = new WebClient())
|
||||
{
|
||||
lblHeading.Content = "Shutting Down Server...";
|
||||
|
@ -95,6 +97,7 @@ namespace MediaBrowser.Uninstaller.Execute
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// if the startmenu item is empty now - delete it too
|
||||
if (Directory.GetFiles(startMenu).Length == 0)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user