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.
- data/History.txt +4 -0
- data/share/linux/ar_sendmail +6 -3
- metadata +1 -1
data/History.txt
CHANGED
data/share/linux/ar_sendmail
CHANGED
@@ -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
|
-
|
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
|