Skip to content

Commit

Permalink
Update helper methods for servie commands
Browse files Browse the repository at this point in the history
  • Loading branch information
balasankarc committed Feb 26, 2019
1 parent 8b5a7c5 commit acb6076
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libraries/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def runit_send_signal(signal, friendly_name = nil)
end

def running?
cmd = safe_sv_shellout("#{sv_args}status #{service_dir_name}", returns: [0, 100])
cmd = safe_sv_shellout("#{sv_args}#{new_resource.status_command} #{service_dir_name}", returns: [0, 100])
!cmd.error? && cmd.stdout =~ /^run:/
end

Expand Down Expand Up @@ -153,15 +153,15 @@ def disable_service
end

def start_service
safe_sv_shellout!("#{sv_args}start #{service_dir_name}")
safe_sv_shellout!("#{sv_args}#{new_resource.start_command} #{service_dir_name}")
end

def stop_service
safe_sv_shellout!("#{sv_args}stop #{service_dir_name}")
safe_sv_shellout!("#{sv_args}#{new_resource.stop_command} #{service_dir_name}")
end

def restart_service
safe_sv_shellout!("#{sv_args}restart #{service_dir_name}")
safe_sv_shellout!("#{sv_args}#{new_resource.restart_command} #{service_dir_name}")
end

def restart_log_service
Expand Down

0 comments on commit acb6076

Please sign in to comment.