Module: Lazyportal::Tomcat
- Defined in:
- lib/lazyportal/tomcat.rb
Instance Method Summary collapse
- #exists? ⇒ Boolean
- #run(script) ⇒ Object
- #tail(log_file) ⇒ Object
-
#tomcat_root ⇒ Object
You must have “tomcat” in your tomcat root folder name in order for lazyportal to see it.
Instance Method Details
#exists? ⇒ Boolean
9 10 11 |
# File 'lib/lazyportal/tomcat.rb', line 9 def exists? tomcat_root.nil? end |
#run(script) ⇒ Object
13 14 15 |
# File 'lib/lazyportal/tomcat.rb', line 13 def run script system "./#{tomcat_root}/bin/#{script}" end |
#tail(log_file) ⇒ Object
17 18 19 |
# File 'lib/lazyportal/tomcat.rb', line 17 def tail log_file system "tail -f #{tomcat_root}/logs/#{log_file}" end |
#tomcat_root ⇒ Object
You must have “tomcat” in your tomcat root folder name in order for lazyportal to see it
5 6 7 |
# File 'lib/lazyportal/tomcat.rb', line 5 def tomcat_root Dir["**/*"].select { |f| f.match /tomcat/i }.first end |