aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorChad Catlett2013-04-08 08:31:48 -0500
committerJack Nagel2013-04-11 23:47:45 -0500
commit873226e741e8cbc14692309cb4d41695837848cf (patch)
treed10b0e73e6973f7ce6398a3387bd67034a754dad /Library
parentf30200890e31dd846cdc3015ac8e531e642b04eb (diff)
downloadbrew-873226e741e8cbc14692309cb4d41695837848cf.tar.bz2
Make brew services use the correct filename
Closes Homebrew/homebrew#19050. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library')
-rwxr-xr-xLibrary/Contributions/cmd/brew-services.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/Library/Contributions/cmd/brew-services.rb b/Library/Contributions/cmd/brew-services.rb
index 4891ae510..308c5ef11 100755
--- a/Library/Contributions/cmd/brew-services.rb
+++ b/Library/Contributions/cmd/brew-services.rb
@@ -112,7 +112,7 @@ module ServicesCli
def path; root? ? boot_path : user_path end
# Find all currently running services via launchctl list
- def running; %x{#{launchctl} list | grep com.github.homebrew}.chomp.split("\n").map { |svc| $1 if svc =~ /(com\.github\.homebrew\..+)\z/ }.compact end
+ def running; %x{#{launchctl} list | grep homebrew.mxcl}.chomp.split("\n").map { |svc| $1 if svc =~ /(homebrew\.mxcl\..+)\z/ }.compact end
# Check if running as homebre and load required libraries et al.
def homebrew!
@@ -207,7 +207,7 @@ module ServicesCli
end
# 2. remove unused plist files
- Dir[path + 'com.github.homebrew.*.plist'].each do |file|
+ Dir[path + 'homebrew.mxcl.*.plist'].each do |file|
unless running.include?(File.basename(file).sub(/\.plist$/i, ''))
puts "Removing unused plist #{file}"
rm file
@@ -301,7 +301,7 @@ class Service
# Create a new `Service` instance from either a path or label.
def self.from(path_or_label)
- return nil unless path_or_label =~ /com\.github\.homebrew\.([^\.]+)(\.plist)?\z/
+ return nil unless path_or_label =~ /homebrew\.mxcl\.([^\.]+)(\.plist)?\z/
new(Formula.factory(Formula.canonical_name($1))) rescue nil
end
@@ -314,7 +314,7 @@ class Service
# Label delegates to formula.plist_name, e.g `homebrew.mxcl.<formula>`.
def label; @label ||= formula.plist_name end
- # Path to a static plist file, this is always `com.github.homebrew.<formula>.plist`.
+ # Path to a static plist file, this is always `homebrew.mxcl.<formula>.plist`.
def plist; @plist ||= formula.prefix + "#{label}.plist" end
# Path to destination plist, if run as root it's in `boot_path`, else `user_path`.
@@ -343,7 +343,7 @@ class Service
data = open(data).read
end
- # replace "template" variables and ensure label is always, always com.github.homebrew.<formula>
+ # replace "template" variables and ensure label is always, always homebrew.mxcl.<formula>
data = data.to_s.gsub(/\{\{([a-z][a-z0-9_]*)\}\}/i) { |m| formula.send($1).to_s if formula.respond_to?($1) }.
gsub(%r{(<key>Label</key>\s*<string>)[^<]*(</string>)}, '\1' + label + '\2')