public
Description: OneBody is web-based software that connects community members, especially churches, on the web.
Homepage: http://beonebody.com
Clone URL: git://github.com/seven1m/onebody.git
More install capistrano tasks.
Tim Morgan (author)
Thu Aug 14 06:14:00 -0700 2008
commit  9e6ac58c9dbacb204f222caa4d5033494b51e07e
tree    6c8dbd9849c013e365f8c04117deca076839e1bf
parent  e2572b273f92424d2628d4d9e1f889cf89f9acfe
...
9
10
11
 
12
13
14
...
79
80
81
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82
83
84
...
9
10
11
12
13
14
15
...
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
0
@@ -9,6 +9,7 @@ namespace :deploy do
0
       rails
0
       passenger
0
       mysql
0
+      postfix
0
     end
0
     
0
     desc 'Install Ruby/OneBody prerequisites'
0
@@ -79,6 +80,22 @@ namespace :deploy do
0
       sudo 'aptitude update'
0
       sudo 'aptitude install -y mysql-server libmysql-ruby1.8'
0
     end
0
+    
0
+    desc 'Install Postfix'
0
+    task :postfix, :roles => :web do
0
+      sudo 'aptitude update'
0
+      sudo 'aptitude install -y postfix'
0
+    end
0
+    
0
+    # Configure iptables firewall (assumes iptables already installed)
0
+    # use at your own risk (check templates/iptables.txt before you use this)
0
+    task :firewall, :roles => :web do
0
+      rules = render_erb_template(File.dirname(__FILE__) + '/templates/iptables.txt')
0
+      put rules, "/tmp/iptables.up.rules"
0
+      sudo "mv /tmp/iptables.up.rules /etc/"
0
+      sudo "ruby -e \"d=File.read('/etc/network/interfaces'); exit if d =~ /iptables/; d.gsub!(/(iface lo inet loopback)(\\n)/, '\\1\\2pre-up iptables-restore < /etc/iptables.up.rules\\2'); File.open('/etc/network/interfaces', 'w') { |f| f.write(d) }\""
0
+      puts 'Restart the server for the config to take effect.'
0
+    end
0
 
0
   end
0
 end

Comments