Class: AutomateIt::ServiceManager::BaseDriver

Inherits:
Plugin::Driver show all
Defined in:
lib/automateit/service_manager.rb

Overview

ServiceManager::BaseDriver

Base class for all ServiceManager drivers.

Direct Known Subclasses

SYSV

Constant Summary

Constants inherited from Plugin::Driver

Plugin::Driver::BASE_DRIVER_NAME

Constants included from Constants

Constants::HELPERS_DIR, Constants::INSTALL_DIR, Constants::PERROR, Constants::PEXEC, Constants::PNOTE, Constants::WARNING_BOILERPLATE

Instance Attribute Summary

Attributes inherited from Plugin::Driver

#manager

Attributes inherited from Common

#interpreter

Instance Method Summary collapse

Methods inherited from Plugin::Driver

abstract_driver, #available?, base_driver, base_driver?, depends_on, inherited, manager_token, #setup, #suitability

Methods inherited from Plugin::Base

#setup, #token, token

Methods inherited from Common

#initialize, #log, #nitpick, #noop, #noop=, #noop?, #preview, #preview=, #preview?, #preview_for, #setup, #superuser?, #writing, #writing=, #writing?

Constructor Details

This class inherits a constructor from AutomateIt::Common

Instance Method Details

#start_and_enable(service, opts = {}) ⇒ Object

See ServiceManager#start_and_enable



83
84
85
86
# File 'lib/automateit/service_manager.rb', line 83

def start_and_enable(service, opts={})
  start(service, opts)
  enable(service, opts)
end

#start_or_restart(service, is_restart, opts = {}) ⇒ Object

See ServiceManager#start_or_restart



78
79
80
# File 'lib/automateit/service_manager.rb', line 78

def start_or_restart(service, is_restart, opts={})
  send(is_restart ? :restart : :start, service, opts)
end