class Pushapp::Tasks::NginxExport

Public Instance Methods

run() click to toggle source
# File lib/pushapp/tasks/nginx_export.rb, line 6
def run
  system "#{sudo} cp #{nginx_conf} #{nginx_sites}"

  unless options[:nginx_skip_reload]
    system "#{sudo} /etc/init.d/nginx reload"
  end
end

Private Instance Methods

find_nginx_conf() click to toggle source
# File lib/pushapp/tasks/nginx_export.rb, line 26
def find_nginx_conf
  file = "config/deploys/#{app_name_from_path}.nginx.conf"
  return file if File.exists?(file)
end
nginx_conf() click to toggle source
# File lib/pushapp/tasks/nginx_export.rb, line 18
def nginx_conf
  options[:nginx_conf] || find_nginx_conf
end
nginx_sites() click to toggle source
# File lib/pushapp/tasks/nginx_export.rb, line 22
def nginx_sites
  options[:nginx_sites] || '/etc/nginx/sites-enabled'
end