Sha256: d7e879c5b66b04db4533632e0eda2168803a20d93eb70d673b21d02642afdf69
Contents?: true
Size: 743 Bytes
Versions: 26
Compression:
Stored size: 743 Bytes
Contents
#!/usr/bin/ruby require "dyndoc/srv/interactive-server" if ["--no-forever","--no-daemon"].include? ARGV[0] Dyndoc::InteractiveServer.new.run else require 'daemons' require 'dyndoc/init/home' require 'fileutils' dir_pids=File.join(Dyndoc.home,"pids") dir_log=File.join(Dyndoc.home,"log") FileUtils.mkdir_p dir_pids FileUtils.mkdir_p dir_log ## from delayed_job gem @files_to_reopen = [] ObjectSpace.each_object(File) do |file| @files_to_reopen << file unless file.closed? end Daemons.run_proc('dyn-srv',{dir: dir_pids, log_output: true, log_dir: dir_log}) do @files_to_reopen.each do |file| file.reopen file.path, 'a+' file.sync = true end Dyndoc::InteractiveServer.new.run end end
Version data entries
26 entries across 26 versions & 1 rubygems