Module: DeploYML::Servers::Apache
- Defined in:
- lib/deployml/servers/apache.rb
Overview
Provides methods for starting, stopping and restarting the Apache web server.
Instance Method Summary collapse
-
#server_restart(shell) ⇒ Object
Restarts Apache using the
apachectl restart
command. -
#server_start(shell) ⇒ Object
Starts Apache using the
apachectl start
command. -
#server_stop(shell) ⇒ Object
Stops Apache using the
apachectl stop
command.
Instance Method Details
#server_restart(shell) ⇒ Object
Restarts Apache using the apachectl restart
command.
30 31 32 33 34 35 36 |
# File 'lib/deployml/servers/apache.rb', line 30 def server_restart(shell) shell.status "Restarting Apache ..." shell.run 'apachectl', 'restart' shell.status "Apache restarted." end |
#server_start(shell) ⇒ Object
Starts Apache using the apachectl start
command.
16 17 18 19 20 21 22 |
# File 'lib/deployml/servers/apache.rb', line 16 def server_start(shell) shell.status "Starting Apache ..." shell.run 'apachectl', 'start' shell.status "Apache started." end |
#server_stop(shell) ⇒ Object
Stops Apache using the apachectl stop
command.
44 45 46 47 48 49 50 |
# File 'lib/deployml/servers/apache.rb', line 44 def server_stop(shell) shell.status "Stopping Apache ..." shell.run 'apachectl', 'stop' shell.status "Apache stoped." end |