haproxy2rpm 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md ADDED
@@ -0,0 +1,6 @@
1
+ # CHANGELOG
2
+
3
+ ## v 0.0.7
4
+
5
+ * support for pid file in normal mode (not daemonized)
6
+ * daemonize mode is broken
data/README.md CHANGED
@@ -33,9 +33,8 @@ Tell haproxy to log to syslog. e.g:
33
33
 
34
34
  ## Known issues
35
35
 
36
- * Seems to stall after some time running
37
- * Do not run with --daemonize when used inside monit.rc
38
-
36
+ * Daemonize is broken. Does not work nicely with new relic agent
37
+
39
38
  ## Roadmap
40
39
 
41
- * Improved logging and debugging (-l, --log)
40
+ * Working daemonized mode
data/lib/haproxy2rpm.rb CHANGED
@@ -21,6 +21,7 @@ module Haproxy2Rpm
21
21
  logger.info 'daemonizing'
22
22
  run_daemonized(log_file, options)
23
23
  else
24
+ write_pid(options[:pid], Process.pid)
24
25
  if(options[:syslog])
25
26
  run_syslog_server(options)
26
27
  else
@@ -65,12 +66,16 @@ module Haproxy2Rpm
65
66
  end
66
67
  end
67
68
 
68
- if options[:pid]
69
- File.open(options[:pid], 'w') { |f| f.write pid }
70
- end
69
+ write_pid(options[:pid], pid)
71
70
 
72
71
  ::Process.detach pid
73
72
 
74
73
  exit
75
74
  end
75
+
76
+ def self.write_pid(pid_file, pid)
77
+ if pid_file
78
+ File.open(pid_file, 'w') { |f| f.write pid }
79
+ end
80
+ end
76
81
  end
@@ -1,3 +1,3 @@
1
1
  module Haproxy2Rpm
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: haproxy2rpm
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 6
10
- version: 0.0.6
9
+ - 7
10
+ version: 0.0.7
11
11
  platform: ruby
12
12
  authors:
13
13
  - Patrick Huesler
@@ -87,6 +87,7 @@ extra_rdoc_files: []
87
87
 
88
88
  files:
89
89
  - .gitignore
90
+ - CHANGELOG.md
90
91
  - Gemfile
91
92
  - README.md
92
93
  - Rakefile