Browse Source

dont restart tomcat service before context has been symlinked in

Seth Chisamore 13 years ago
parent
commit
72150eb1e3
1 changed files with 4 additions and 2 deletions
  1. 4 2
      recipes/tomcat.rb

+ 4 - 2
recipes/tomcat.rb

@@ -33,5 +33,7 @@ link "#{node['tomcat']['context_dir']}/ROOT.xml" do
   notifies :restart, resources(:service => "tomcat")
 end
 
-d = resources(:remote_file => app['id'])
-d.notifies :restart, resources(:service => "tomcat")
+if File.symlink?(File.join(node['tomcat']['context_dir'], "ROOT.xml"))
+  d = resources(:remote_file => app['id'])
+  d.notifies :restart, resources(:service => "tomcat")
+end