diff --git a/lib/capistrano/dsl/nginx_paths.rb b/lib/capistrano/dsl/nginx_paths.rb index 6943594..dc973d0 100644 --- a/lib/capistrano/dsl/nginx_paths.rb +++ b/lib/capistrano/dsl/nginx_paths.rb @@ -11,7 +11,7 @@ def nginx_sites_enabled_file end def nginx_service_path - '/etc/init.d/nginx' + "#{fetch(:nginx_service_path)}" end def nginx_default_pid_file diff --git a/lib/capistrano/tasks/nginx.rake b/lib/capistrano/tasks/nginx.rake index 0f30e79..abdcd5d 100644 --- a/lib/capistrano/tasks/nginx.rake +++ b/lib/capistrano/tasks/nginx.rake @@ -9,6 +9,7 @@ namespace :load do set :templates_path, 'config/deploy/templates' set :nginx_config_name, -> { "#{fetch(:application)}_#{fetch(:stage)}" } set :nginx_pid, nginx_default_pid_file + set :nginx_service_path, '/etc/init.d/nginx' # set :nginx_server_name # default set in the `nginx:defaults` task # ssl options set :nginx_location, '/etc/nginx'