lib/thinking_sphinx/tasks.rb in freelancing-god-thinking-sphinx-1.1.21 vs lib/thinking_sphinx/tasks.rb in freelancing-god-thinking-sphinx-1.1.22
- old
+ new
@@ -28,11 +28,11 @@
FileUtils.mkdir_p config.searchd_file_path
raise RuntimeError, "searchd is already running." if sphinx_running?
Dir["#{config.searchd_file_path}/*.spl"].each { |file| File.delete(file) }
- system! "#{config.bin_path}searchd --pidfile --config #{config.config_file}"
+ system! "#{config.bin_path}#{config.searchd_binary_name} --pidfile --config #{config.config_file}"
sleep(2)
if sphinx_running?
puts "Started successfully (pid #{sphinx_pid})."
@@ -44,11 +44,11 @@
desc "Stop Sphinx using Thinking Sphinx's settings"
task :stop => :app_env do
raise RuntimeError, "searchd is not running." unless sphinx_running?
config = ThinkingSphinx::Configuration.instance
pid = sphinx_pid
- system! "#{config.bin_path}searchd --stop --config #{config.config_file}"
+ system! "#{config.bin_path}#{config.searchd_binary_name} --stop --config #{config.config_file}"
puts "Stopped search daemon (pid #{pid})."
end
desc "Restart Sphinx"
task :restart => [:app_env, :stop, :start]
@@ -69,11 +69,11 @@
puts "Generating Configuration to #{config.config_file}"
config.build
end
FileUtils.mkdir_p config.searchd_file_path
- cmd = "#{config.bin_path}indexer --config #{config.config_file} --all"
+ cmd = "#{config.bin_path}#{config.indexer_binary_name} --config #{config.config_file} --all"
cmd << " --rotate" if sphinx_running?
system! cmd
end
@@ -157,6 +157,6 @@
You can set the path to your indexer and searchd binaries using the bin_path property in config/sphinx.yml:
production:
bin_path: '/usr/local/bin'
SYSTEM_CALL_FAILED
end
-end
\ No newline at end of file
+end