Class: Bixby::Provision::Services::Init

Inherits:
ServiceBase show all
Defined in:
lib/bixby/provision/dsl/services/init.rb

Constant Summary

Constants inherited from Base

Base::PATH

Instance Attribute Summary

Attributes inherited from Base

#manifest, #proxy

Instance Method Summary collapse

Methods inherited from Base

#get_gid, #get_group, #get_uid, #get_user, #initialize, #tap, #tempfile

Methods included from Util::File

#chmod, #chown, #sha256sum, #which

Constructor Details

This class inherits a constructor from Bixby::Provision::Base

Instance Method Details

#reload(name, opts = {}) ⇒ Object



20
21
22
# File 'lib/bixby/provision/dsl/services/init.rb', line 20

def reload(name, opts={})
  init("#{name} reload")
end

#restart(name, opts = {}) ⇒ Object



16
17
18
# File 'lib/bixby/provision/dsl/services/init.rb', line 16

def restart(name, opts={})
  init("#{name} restart")
end

#running?(name) ⇒ Boolean

Returns:

  • (Boolean)


24
25
26
27
# File 'lib/bixby/provision/dsl/services/init.rb', line 24

def running?(name)
  cmd = init("#{name} status")
  return cmd.success? # exit 0 means it's running (usually.. hopefully!)
end

#start(name, opts = {}) ⇒ Object



8
9
10
# File 'lib/bixby/provision/dsl/services/init.rb', line 8

def start(name, opts={})
  init("#{name} start")
end

#stop(name, opts = {}) ⇒ Object



12
13
14
# File 'lib/bixby/provision/dsl/services/init.rb', line 12

def stop(name, opts={})
  init("#{name} stop")
end