bin/flapjack-notifier-manager in auxesis-flapjack-0.4.9 vs bin/flapjack-notifier-manager in auxesis-flapjack-0.4.10
- old
+ new
@@ -25,13 +25,20 @@
unless File.writable?(pid_dir)
puts "Can't write to #{pid_dir} - check permissions?"
exit 2
end
-daemon_args = (args + ['--', '--beanstalk', options.host,
- '--port', options.port.to_s,
- '--recipients', options.recipients])
+# construct arguments
+daemon_args = args
+if args.first != "stop"
+ # if we're not stopping the daemon, pass options to it
+ daemon_args += ['--', '--beanstalk', options.host,
+ '--port', options.port.to_s,
+ '--recipients', options.recipients,
+ '--config', File.expand_path(options.config_filename)]
+end
+# boot
Daemons.run(worker_path, :ARGV => daemon_args,
:multiple => false,
:dir_mode => :normal,
:dir => pid_dir)