Created
January 11, 2012 22:08
-
-
Save jdlich/1597050 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
desc "Watches tomcat logs" | |
task :logs do | |
log = "#{TOMCAT}/logs/catalina.out" | |
system("touch #{log}") unless File.exists?(log) | |
system "tail -f #{TOMCAT}/logs/catalina.out" | |
end | |
desc "Starts tomcat" | |
task :start do | |
system "./#{TOMCAT}/bin/startup.sh" | |
end | |
desc "Stops tomcat" | |
task :stop do | |
system "./#{TOMCAT}/bin/shutdown.sh" | |
end | |
desc "Stop, publish and restart tomcat" | |
task :restart do | |
%w{ stop publish start }.each do |task| | |
Rake.application.invoke_task(task.to_s) | |
sleep 1 | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment