FiXato-ubuntu-machine 0.5.3.2.5 → 0.5.3.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,8 +14,12 @@ namespace :ruby do
14
14
 
15
15
 
16
16
  set :ruby_enterprise_url do
17
- path = Net::HTTP.get('www.rubyenterpriseedition.com', '/download.html').scan(/<a href="\/ruby-enterprise-.*\.tar\.gz/).first
18
- path.gsub!('<a href="','http://www.rubyenterpriseedition.com')
17
+ path = Net::HTTP.get('www.rubyenterpriseedition.com', '/download.html').scan(/<a href=".*\/ruby-enterprise-.*\.tar\.gz"/).first
18
+ path.gsub!('<a href="','').gsub!('"','')
19
+ # in case they have relative URLs again:
20
+ if path[0,1] == '/'
21
+ path = 'http://www.rubyenterpriseedition.com%s' % path
22
+ end
19
23
  path
20
24
  end
21
25
 
@@ -28,7 +32,7 @@ namespace :ruby do
28
32
  end
29
33
 
30
34
  set :passenger_version do
31
- `gem list passenger$ -r`.gsub(/[\n|\s|passenger|(|)]/,"")
35
+ `gem list passenger$ -r`.gsub(/[\n|\s|passenger|(|)]/,"").split(',').first
32
36
  end
33
37
 
34
38
 
@@ -40,7 +40,7 @@
40
40
 
41
41
 
42
42
  # Reject all other inbound - default deny unless explicitly allowed policy
43
- -A INPUT -j REJECT
44
- -A FORWARD -j REJECT
43
+ #-A INPUT -j REJECT
44
+ #-A FORWARD -j REJECT
45
45
 
46
46
  COMMIT
@@ -17,4 +17,26 @@ namespace :tmpfs do
17
17
  sudo "mv fstab.tmp /etc/fstab"
18
18
  end
19
19
  end
20
+
21
+ desc "Create ftp directories within :vsftpd_tmpfs_directory for each user defined in :vsftpd_users and symlink in their homedirs"
22
+ task :create_vsftpd_tmpfs_dirs, :roles => :app do
23
+ cron_commands = []
24
+ vsftpd_users.each do |target_user|
25
+ target_tmpfs_dir = File.join(vsftpd_tmpfs_directory,target_user)
26
+ cmds = []
27
+ cmds << "mkdir -p #{target_tmpfs_dir}"
28
+ cmds << "chown #{target_user}:#{vsftpd_group} #{target_tmpfs_dir}"
29
+ cmds << "chmod 0777 #{target_tmpfs_dir}"
30
+ cmds.each{|cmd| sudo cmd}
31
+ cron_commands << cmds.join(' && ')
32
+ sudo "ln -s #{File.join(vsftpd_tmpfs_directory,target_user)} ~#{target_user}/ftp"
33
+ end
34
+
35
+ tmp_cron="/tmp/tmp_cron"
36
+ sudo "rm -f #{tmp_cron} && crontab -l || true > #{tmp_cron}"
37
+ cron_commands.compact.each do |cmd|
38
+ run "echo '@reboot #{cmd}' >> #{tmp_cron}"
39
+ end
40
+ sudo "crontab #{tmp_cron}"
41
+ end
20
42
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: FiXato-ubuntu-machine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3.2.5
4
+ version: 0.5.3.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Balthazar
@@ -11,7 +11,7 @@ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
13
 
14
- date: 2009-06-17 00:00:00 -07:00
14
+ date: 2009-06-18 00:00:00 -07:00
15
15
  default_executable:
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency