adzap-ar_mailer 1.4.3 → 1.4.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/History.txt +4 -0
  2. data/share/linux/ar_sendmail +6 -3
  3. metadata +1 -1
@@ -1,3 +1,7 @@
1
+ = 1.4.4
2
+
3
+ * Exit init.d script with message if no mailers defined.
4
+
1
5
  = 1.4.3
2
6
 
3
7
  * Bugs fixed
@@ -11,7 +11,11 @@ require 'yaml'
11
11
  config_file = '/etc/ar_sendmail.conf'
12
12
 
13
13
  begin
14
- config = YAML::load(IO.read(config_file))
14
+ config = YAML::load(IO.read(config_file)) || {}
15
+ if config.empty? || (config.has_key?('defaults') && config.size == 1)
16
+ puts "No mailers defined. Exiting."
17
+ exit
18
+ end
15
19
  rescue Errno::ENOENT
16
20
  puts "Config file not found at '#{config_file}'!"
17
21
  exit
@@ -30,8 +34,7 @@ def start(app, options)
30
34
  end
31
35
 
32
36
  def stop(app, options)
33
- path = options['chdir']
34
- pid_file = File.expand_path(options['pidfile'], path)
37
+ pid_file = File.expand_path(options['pidfile'], options['chdir'])
35
38
  if File.exist? pid_file
36
39
  begin
37
40
  pid = open(pid_file).read.to_i
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: adzap-ar_mailer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.3
4
+ version: 1.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Hodel