Class: Sunshine::ARSendmail
- Defined in:
- lib/sunshine/daemons/ar_sendmail.rb
Overview
Simple daemon wrapper for ar_sendmail setup and control. By default, uses server apps with the :mail role.
Constant Summary
Constants inherited from Daemon
Daemon::RESTART_FAILED_CODE, Daemon::START_FAILED_CODE, Daemon::STATUS_DOWN_CODE, Daemon::STOP_FAILED_CODE
Instance Attribute Summary
Attributes inherited from Daemon
#app, #bin, #config_file, #config_path, #config_template, #name, #pid, #processes, #restart_cmd, #server_apps, #status_cmd, #stop_cmd, #sudo, #timeout
Instance Method Summary collapse
-
#initialize(app, options = {}) ⇒ ARSendmail
constructor
A new instance of ARSendmail.
- #start_cmd ⇒ Object
Methods inherited from Daemon
#_restart_cmd, #_start_cmd, #_status_cmd, #_stop_cmd, binder_methods, #chown_log_files, #config_binding, #config_file_path, #config_template_files, #configure_remote_dirs, #each_server_app, #exit_on_failure, #has_setup?, #log_file, #log_files, #pick_sudo, #register_after_user_script, #restart, #setup, short_name, #start, #status, #stop, underscore, #upload_config_files
Constructor Details
#initialize(app, options = {}) ⇒ ARSendmail
Returns a new instance of ARSendmail.
9 10 11 12 13 14 15 |
# File 'lib/sunshine/daemons/ar_sendmail.rb', line 9 def initialize app, ={} [:role] ||= :mail super app, @dep_name = [:dep_name] || 'ar_mailer' end |
Instance Method Details
#start_cmd ⇒ Object
18 19 20 |
# File 'lib/sunshine/daemons/ar_sendmail.rb', line 18 def start_cmd "cd #{@app.current_path} && #{@bin} -p #{@pid} -d" end |