Class: Dolphin::Nginx

Inherits:
Base
  • Object
show all
Defined in:
lib/dolphin.rb

Overview

Nginx

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Dolphin::Base

Instance Method Details

#confObject



166
167
168
169
170
171
172
173
174
# File 'lib/dolphin.rb', line 166

def conf
  menu = [
    "
      sudo ln -sf #{@deploy_dir}/config/nginx/#{@application}.conf /etc/nginx/conf.d/#{@application}.conf
    ",
  ]

  execute menu
end

#installObject



148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
# File 'lib/dolphin.rb', line 148

def install
  menu = [
    "
      # set repo
      sudo cp ~/nginx.repo /etc/yum.repos.d/

      # list repos
      # yum repolist

      # install nginx
      sudo yum -y install nginx
    ",
  ]

  execute menu
end

#restartObject



201
202
203
204
205
206
207
208
209
210
# File 'lib/dolphin.rb', line 201

def restart
  menu = [
    "
      # common settings
      sudo service nginx restart
    ",
  ]

  execute menu
end

#startObject



177
178
179
180
181
182
183
184
185
186
# File 'lib/dolphin.rb', line 177

def start
  menu = [
    "
      # common settings
      sudo service nginx start
    ",
  ]

  execute menu
end

#stopObject



189
190
191
192
193
194
195
196
197
198
# File 'lib/dolphin.rb', line 189

def stop
  menu = [
    "
      # common settings
      sudo service nginx stop
    ",
  ]

  execute menu
end