Class | AutomateIt::ServiceManager |
In: |
lib/automateit/service_manager.rb
|
Parent: | AutomateIt::Plugin::Manager |
ServiceManager provides a way of managing services, such starting and stopping Unix daemons.
Restart this service if it‘s running, or start it if it‘s stopped.
Options:
# File lib/automateit/service_manager.rb, line 46 def restart(service, opts={}) dispatch(service, opts) end
Alias for started?
# File lib/automateit/service_manager.rb, line 23 def running?(service, opts={}) dispatch_to(:started?, service, opts) end
Start this service if it‘s not running.
Options:
# File lib/automateit/service_manager.rb, line 30 def start(service, opts={}) dispatch(service, opts) end
Is this service started?
Options:
# File lib/automateit/service_manager.rb, line 12 def started?(service, opts={}) dispatch(service, opts) end
Stop this service if it‘s running.
Options:
# File lib/automateit/service_manager.rb, line 37 def stop(service, opts={}) dispatch(service, opts) end
Is this service stopped?
Options:
# File lib/automateit/service_manager.rb, line 20 def stopped?(service, opts={}) dispatch(service, opts) end