class PleaseRun::Platform::Launchd
The platform implementation for Appleās launchd.
OS X users, this is for you!
Public Instance Methods
Source
# File lib/pleaserun/platform/launchd.rb, line 9 def daemons_path # Quoting launchctl(1): # "/Library/LaunchDaemons System wide daemons provided by the administrator." return safe_filename("/Library/LaunchDaemons/{{ name }}.plist") end
Returns the file path to write this launchd config
Source
# File lib/pleaserun/platform/launchd.rb, line 15 def files return Enumerator::Generator.new do |out| out.yield(daemons_path, render_template("program.plist")) end end
Source
# File lib/pleaserun/platform/launchd.rb, line 21 def install_actions return ["launchctl load #{daemons_path}"] end
Source
# File lib/pleaserun/platform/launchd.rb, line 25 def xml_args return if args.nil? return args.collect { |a| "<string>#{a}</string>" }.join("\n ") end