From 1aa4dc4645246a750f53b37f383a4348f1065770 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Mon, 5 Sep 2016 20:30:30 +0100 Subject: [PATCH] Add forum configuration file --- cookbooks/forum/recipes/default.rb | 8 ++++++++ .../forum/templates/default/config.php.erb | 17 +++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 cookbooks/forum/templates/default/config.php.erb diff --git a/cookbooks/forum/recipes/default.rb b/cookbooks/forum/recipes/default.rb index 880598fb7..4bf5765f2 100644 --- a/cookbooks/forum/recipes/default.rb +++ b/cookbooks/forum/recipes/default.rb @@ -64,6 +64,14 @@ directory "/srv/forum.openstreetmap.org/html/img/avatars/" do mode 0o755 end +template "/srv/forum.openstreetmap.org/html/config.php" do + source "config.php.erb" + owner "forum" + group "forum" + mode 0o440 + variables :passwords => passwords +end + mysql_user "forum@localhost" do password passwords["database"] end diff --git a/cookbooks/forum/templates/default/config.php.erb b/cookbooks/forum/templates/default/config.php.erb new file mode 100644 index 000000000..91ca73803 --- /dev/null +++ b/cookbooks/forum/templates/default/config.php.erb @@ -0,0 +1,17 @@ +'; +$db_prefix = 'osm_'; +$p_connect = false; + +$cookie_name = 'forum_cookie'; +$cookie_domain = ''; +$cookie_path = '/'; +$cookie_secure = 1; +$cookie_seed = '<%= @passwords["cookie_seed"] %>'; + +define('PUN', 1); -- 2.39.5