Don't try to unistall service if it isn't installed (#637)

This commit is contained in:
kaso17 2016-11-04 18:31:19 +01:00 committed by GitHub
parent dd24f12eac
commit 840037aa7f
1 changed files with 5 additions and 0 deletions

View File

@ -119,6 +119,11 @@ namespace Jackett.Services
public void RemoveService()
{
var service = GetService(NAME);
if(service == null)
{
logger.Warn("The service is already uninstalled");
return;
}
if (service.Status != ServiceControllerStatus.Stopped)
{
service.Stop();