【发布时间】:2012-11-28 02:45:09
【问题描述】:
我正在开发 Rails v2.3.2 应用程序。在 Ubuntu 机器上。
现在,我想要两个 rake 任务分别 stop 和 start *Nginx*,这需要什么命令?
task :start_nginx do
puts "stop Nginx..."
system '...' #What is the command to stop Nginx?
end
task :stop_nginx do
puts "stop Nginx..."
system '...' #What is the command to start Nginx?
end
【问题讨论】:
标签: ruby-on-rails ubuntu nginx