lib/daemon-ogre.rb in daemon-ogre-1.2.2 vs lib/daemon-ogre.rb in daemon-ogre-1.2.3

- old
+ new

@@ -296,15 +296,19 @@ text.each_line do |line| terminate_on_command.push DaemonOgre.process_running?(line) end end - if !terminate_on_command.include?(true) - @@startup = true + if !terminate_on_command.nil? + if !terminate_on_command.include?(true) + @@startup = true + else + puts "sorry but process is already running in this specification" + Process.exit + end else - puts "sorry but process is already running in this specification" - Process.exit + @@startup = true end end def stop puts "#{$0} is going to be FacePalmed..." @@ -427,15 +431,10 @@ #monkey patch begin def process_running?(input) DaemonOgre.process_running?(input) end - class File - def self.create!(input,optionable_data=nil,optionable_file_mod="w") - DaemonOgre.create_on_filesystem(input,optionable_data,optionable_file_mod) - end - end def require_directory(directory,*args) DaemonOgre.load_directory(directory,*args) end def require_ymls(directory) DaemonOgre.load_ymls(directory) @@ -443,9 +442,14 @@ def get_port(port,max_port=65535 ,host="0.0.0.0") DaemonOgre.get_port(port,max_port,host) end def logger(error_msg,prefix="",log_file=DaemonOgre::App.log_path) DaemonOgre.error_logger(error_msg,prefix,log_file) + end + class File + def self.create!(input,optionable_data=nil,optionable_file_mod="w") + DaemonOgre.create_on_filesystem(input,optionable_data,optionable_file_mod) + end end class Class def class_methods self.methods - Object.methods end \ No newline at end of file