Created
November 29, 2011 16:48
-
-
Save eLafo/1405485 to your computer and use it in GitHub Desktop.
get the ports assigned to sphinx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
#Instructions: ruby < <(wget -nv -O - <link_to_raw_file>) | |
#where link_to_raw_file is the raw url of this file | |
require 'yaml' | |
puts(Dir.glob('/home/*/app/current/config/sphinx.yml').inject([]) do |a, file| | |
a << [YAML.load_file(file)['production']['port'], file] | |
end.sort_by{|a| a[0]}.map{|a| a.join(' -> ')}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment