Move blog backup script to the right cookbook
authorTom Hughes <tom@compton.nu>
Sun, 23 Jun 2013 19:22:29 +0000 (20:22 +0100)
committerTom Hughes <tom@compton.nu>
Sun, 23 Jun 2013 19:30:24 +0000 (20:30 +0100)
cookbooks/blog/recipes/default.rb
cookbooks/blog/templates/default/backup.cron.erb [moved from cookbooks/foundation/templates/default/backup.cron.erb with 75% similarity]
cookbooks/foundation/recipes/default.rb

index 3a363bc02c99a584c127750af5d9311a942061f2..95997cd2893ee030f1b9e203bcc999d2c0de96d0 100644 (file)
@@ -86,3 +86,11 @@ apache_site "opengeodata.org" do
   template "opengeodata.erb"
   directory "/srv/opengeodata.org"
 end
+
+template "/etc/cron.daily/blog-backup" do
+  source "backup.cron.erb"
+  owner "root"
+  group "root"
+  mode 0750
+  variables :passwords => passwords
+end
similarity index 75%
rename from cookbooks/foundation/templates/default/backup.cron.erb
rename to cookbooks/blog/templates/default/backup.cron.erb
index 6ab8a63e275940c74f42fecfd2b8876a49b355ef..b64c4f072cd3e9be9ff70807f3a76cffba95c54a 100644 (file)
@@ -7,7 +7,7 @@ D=$(date +%Y-%m-%d)
 B=osm-blog-$D.tar.gz
 
 mkdir $T/osm-blog-$D
-mysqldump --user=osm-blog-user --password=<%= @passwords["osmf-blog-user"] %> --opt osm-blog > $T/osm-blog-$D/osm-blog.sql
+mysqldump --user=osm-blog-user --password=<%= @passwords["osm-blog-user"] %> --opt osm-blog > $T/osm-blog-$D/osm-blog.sql
 ln -s /srv/blog.openstreetmap.org $T/osm-blog-$D/www
 
 export GZIP="--rsyncable -9"
index 366f8a695d9ed2e971d5e493feb3b2c2fd542e66..7b1fa1d05c4293e8e3161ad84d7a5d66764d57a4 100644 (file)
@@ -48,11 +48,3 @@ wordpress_plugin "sitepress-multilingual-cms" do
   site "blog.osmfoundation.org"
   source "plugins/sitepress-multilingual-cms"
 end
-
-template "/etc/cron.daily/blog-backup" do
-  source "backup.cron.erb"
-  owner "root"
-  group "root"
-  mode 0750
-  variables :passwords => passwords
-end