diff --git a/libraries/helpers.rb b/libraries/helpers.rb index 021d818..c743fd4 100644 --- a/libraries/helpers.rb +++ b/libraries/helpers.rb @@ -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 @@ -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