Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Directly use the embedded sv instead of the init symlinks. #54

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/omnibus-ctl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ def run_sv_command(sv_cmd, service=nil)
# run an sv command for a specific service name
def run_sv_command_for_service(sv_cmd, service_name)
if service_enabled?(service_name)
status = run_command("#{base_path}/init/#{service_name} #{sv_cmd}")
status = run_command("#{base_path}/embedded/bin/sv #{sv_cmd} #{service_name}")
status.exitstatus
else
log "#{service_name} disabled" if sv_cmd == "status" && verbose
Expand Down
4 changes: 2 additions & 2 deletions spec/omnibus-ctl_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -404,10 +404,10 @@ def ctl_output
allow(@ctl).to receive(:service_enabled?).and_return(true)
end

it "runs the service command from init" do
it "runs the service command using the embedded sv" do
expect(@ctl)
.to receive(:run_command)
.with("/opt/chef-server/init/erchef start")
.with("/opt/chef-server/embedded/bin/sv start erchef")
.and_return(@status)
@ctl.run_sv_command_for_service("start", "erchef")
end
Expand Down