mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
More autoupdate code.
This commit is contained in:
parent
95460b2134
commit
1270e464b3
25 changed files with 285 additions and 204 deletions
|
@ -22,6 +22,16 @@ namespace NzbDrone.Common
|
|||
s => String.Equals(s.ServiceName, name, StringComparison.InvariantCultureIgnoreCase));
|
||||
}
|
||||
|
||||
public virtual bool IsServiceRunning(string name)
|
||||
{
|
||||
Logger.Debug("Checking if '{0}' service is running", name);
|
||||
|
||||
var service = ServiceController.GetServices()
|
||||
.SingleOrDefault(s => String.Equals(s.ServiceName, name, StringComparison.InvariantCultureIgnoreCase));
|
||||
|
||||
return service != null && service.Status == ServiceControllerStatus.Running;
|
||||
}
|
||||
|
||||
|
||||
public virtual void Install(string serviceName)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue