]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/thinkup/recipes/default.rb
Avoid hypens in munin variable names for composite graphs
[chef.git] / cookbooks / thinkup / recipes / default.rb
index c7b6ed23f71c39f3370e4698162c597197bd3653..ce663bee9edeccd985118d43fc4c2c2cf076f626 100644 (file)
@@ -81,7 +81,7 @@ thinkup_config = edit_file "/srv/thinkup.openstreetmap.org/webapp/config.sample.
   line.gsub!(/^(\$THINKUP_CFG\['site_root_path'\] *=) '[^']*';$/, "\\1 '/';")
   line.gsub!(/^(\$THINKUP_CFG\['timezone'\] *=) '[^']*';$/, "\\1 'Europe/London';")
   line.gsub!(/^(\$THINKUP_CFG\['db_user'\] *=) '[^']*';$/, "\\1 'thinkup';")
-  line.gsub!(/^(\$THINKUP_CFG\['db_password'\] *=) '[^']*';$/, "\\1 '#{passwords["database"]}';")
+  line.gsub!(/^(\$THINKUP_CFG\['db_password'\] *=) '[^']*';$/, "\\1 '#{passwords['database']}';")
   line.gsub!(/^(\$THINKUP_CFG\['db_name'\] *=) '[^']*';$/, "\\1 'thinkup';")
 
   line
@@ -90,7 +90,7 @@ end
 file "/srv/thinkup.openstreetmap.org/webapp/config.inc.php" do
   owner "root"
   group "root"
-  mode 0644
+  mode 0o644
   content thinkup_config
   notifies :reload, "service[apache2]"
 end
@@ -98,7 +98,7 @@ end
 thinkup_cron = edit_file "/srv/thinkup.openstreetmap.org/extras/cron/config.sample" do |line|
   line.gsub!(/^thinkup="[^"]*"$/, "thinkup=\"/srv/thinkup.openstreetmap.org\"")
   line.gsub!(/^thinkup_username="[^"]*"$/, "thinkup_username=\"openstreetmap@jonno.cix.co.uk\"")
-  line.gsub!(/^thinkup_password="[^"]*"$/, "thinkup_password=\"#{passwords["admin"]}\"")
+  line.gsub!(/^thinkup_password="[^"]*"$/, "thinkup_password=\"#{passwords['admin']}\"")
   line.gsub!(/^php="[^"]*"$/, "php=\"/usr/bin/php\"")
   line.gsub!(/^#crawl_interval=[0-9]+$/, "crawl_interval=30")
 
@@ -108,7 +108,7 @@ end
 file "/srv/thinkup.openstreetmap.org/extras/cron/config" do
   owner "root"
   group "thinkup"
-  mode 0640
+  mode 0o640
   content thinkup_cron
 end
 
@@ -123,6 +123,6 @@ template "/etc/cron.daily/thinkup-backup" do
   source "backup.cron.erb"
   owner "root"
   group "root"
-  mode 0750
+  mode 0o750
   variables :passwords => passwords
 end