nailgun-agent: use service command to restart mcollective
mcollectived can be launched via upstart job or systemd unit. Fortunately the service command hides those gory details. Change-Id: Iad4c8bc5d89176513b4d3bcc37a4161a9d900caf Related-Bug: #1454741
This commit is contained in:
parent
381eef2de5
commit
03cddb0c23
6
agent
6
agent
|
@ -109,11 +109,7 @@ class McollectiveConfig
|
|||
@logger.info "Identity in mcollective server.cfg has not been found. Setting to '#{new_id}'"
|
||||
File.open(@configfile, "w") { |f| f.write(config) }
|
||||
end
|
||||
# Generally because generic init script for
|
||||
# mcollective is broken at least in Ubuntu and
|
||||
# altering restart in such way seems better
|
||||
# than shipping our own package.
|
||||
puts `/etc/init.d/mcollective stop; /etc/init.d/mcollective start`
|
||||
puts `service mcollective restart`
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue