Class: Rda::Nginx

Inherits:
Thor
  • Object
show all
Includes:
Helper, Thor::Actions
Defined in:
lib/rda/nginx.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Helper

#configured?

Class Method Details

.setup?Boolean

Returns:

  • (Boolean)


14
15
16
17
18
19
# File 'lib/rda/nginx.rb', line 14

def self.setup?
  conf_dir = Rda.config.nginx.conf_dir

  File.directory?(File.join(conf_dir, 'sites-available')) &&
    File.directory?(File.join(conf_dir, 'sites-enabled'))
end

Instance Method Details

#setup(options = {}) ⇒ Object



7
8
9
10
11
12
# File 'lib/rda/nginx.rb', line 7

def setup(options = {})
  return unless installed?

  mkdir_for_sites
  include_sites_enabled
end