foreman 0.4.6 → 0.4.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,8 +1,8 @@
1
1
  pre-start script
2
2
 
3
3
  bash << "EOF"
4
- mkdir -p <%= log_root %>/<%= app %>
5
- chown -R <%= user %> <%= log_root %>/<%= app %>
4
+ mkdir -p <%= log_root %>
5
+ chown -R <%= user %> <%= log_root %>
6
6
  EOF
7
7
 
8
8
  end script
@@ -3,4 +3,4 @@ stop on stopping <%= app %>-<%= process.name %>
3
3
  respawn
4
4
 
5
5
  chdir <%= engine.directory %>
6
- exec su <%= user %> -c "<%= process.command %> >> <%= log_root %>/<%=app%>/<%=process.name%>-<%=num%>.log 2>&1"
6
+ exec su <%= user %> -c "<%= process.command %> >> <%= log_root %>/<%=process.name%>-<%=num%>.log 2>&1"
data/lib/foreman.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module Foreman
2
2
 
3
- VERSION = "0.4.6"
3
+ VERSION = "0.4.7"
4
4
 
5
5
  class AppDoesNotExist < Exception; end
6
6
 
@@ -7,23 +7,21 @@ class Foreman::Export::Inittab < Foreman::Export::Base
7
7
  user = options[:user] || app
8
8
  log_root = options[:log] || "/var/log"
9
9
 
10
- log_dir = "#{log_root}/#{app}"
11
-
12
10
  concurrency = parse_concurrency(options[:concurrency])
13
11
 
14
12
  inittab = []
15
13
  inittab << "# ----- foreman #{app} processes -----"
16
14
  engine.processes.values.each_with_index do |process, num|
17
15
  id = app.slice(0, 2).upcase + sprintf("%02d", num+1)
18
- inittab << "#{id}:4:respawn:/bin/su - #{user} -c '#{process.command} >> #{log_dir}/#{process.name}-#{num+1}.log 2>&1'"
16
+ inittab << "#{id}:4:respawn:/bin/su - #{user} -c '#{process.command} >> #{log_root}/#{process.name}-#{num+1}.log 2>&1'"
19
17
  end
20
18
  inittab << "# ----- end foreman #{app} processes -----"
21
19
 
22
20
  inittab = inittab.join("\n") + "\n"
23
21
 
24
22
  if fname
25
- FileUtils.mkdir_p(log_dir)
26
- FileUtils.chown(user, nil, log_dir)
23
+ FileUtils.mkdir_p(log_root)
24
+ FileUtils.chown(user, nil, log_root)
27
25
  write_file(fname, inittab)
28
26
  else
29
27
  puts inittab
@@ -10,7 +10,7 @@ class Foreman::Export::Upstart < Foreman::Export::Base
10
10
 
11
11
  app = options[:app] || File.basename(engine.directory)
12
12
  user = options[:user] || app
13
- log_root = options[:log] || "/var/log"
13
+ log_root = options[:log] || "/var/log/#{app}"
14
14
 
15
15
  Dir["#{location}/#{app}*.conf"].each do |file|
16
16
  say "cleaning up: #{file}"
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman
3
3
  version: !ruby/object:Gem::Version
4
- hash: 3
4
+ hash: 1
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 6
10
- version: 0.4.6
9
+ - 7
10
+ version: 0.4.7
11
11
  platform: ruby
12
12
  authors:
13
13
  - David Dollar