Permalink
Browse files

[COOK-1917]: Restart apache when adding new module. Also delete old s…

…qlite db at the same time because the schemas are usually incompatible.
  • Loading branch information...
1 parent 1278415 commit e3784084c5d390ed688a2216ea0374f69dc42ffb @patcoll committed Nov 19, 2012
Showing with 9 additions and 2 deletions.
  1. +9 −2 recipes/mod_auth_openid.rb
View
@@ -62,7 +62,7 @@
cd libopkele-2.0.4 && ./configure --prefix=/usr --libdir=#{syslibdir}
#{make_cmd} && #{make_cmd} install
EOH
- not_if { File.exists?("#{syslibdir}/libopkele.a") }
+ creates "#{syslibdir}/libopkele.a"
end
end
@@ -80,6 +80,11 @@
checksum _checksum
end
+file "mod_auth_openid_dblocation" do
+ path node['apache']['mod_auth_openid']['dblocation']
+ action :nothing
+end
+
bash "install mod_auth_openid" do
cwd Chef::Config['file_cache_path']
code <<-EOH
@@ -88,7 +93,9 @@
perl -pi -e "s/-i -a -n 'authopenid'/-i -n 'authopenid'/g" Makefile
#{make_cmd} && #{make_cmd} install
EOH
- not_if { ::File.exists?("#{node['apache']['libexecdir']}/mod_auth_openid.so") }
+ creates "#{node['apache']['libexecdir']}/mod_auth_openid.so"
+ notifies :delete, "file[mod_auth_openid_dblocation]", :immediately
+ notifies :restart, "service[apache2]"
end
directory node['apache']['mod_auth_openid']['cache_dir'] do

0 comments on commit e378408

Please sign in to comment.