Drop ancient imported daemon generator
authorTom Hughes <tom@compton.nu>
Tue, 27 Aug 2019 14:23:30 +0000 (15:23 +0100)
committerTom Hughes <tom@compton.nu>
Tue, 27 Aug 2019 14:23:30 +0000 (15:23 +0100)
vendor/generators/daemon/daemon_generator.rb [deleted file]
vendor/generators/daemon/templates/daemons [deleted file]
vendor/generators/daemon/templates/daemons.yml [deleted file]
vendor/generators/daemon/templates/script.rb [deleted file]
vendor/generators/daemon/templates/script_ctl [deleted file]

diff --git a/vendor/generators/daemon/daemon_generator.rb b/vendor/generators/daemon/daemon_generator.rb
deleted file mode 100644 (file)
index 83e3bab..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-class DaemonGenerator < Rails::Generator::NamedBase
-  def manifest
-    record do |m|
-      m.directory "lib/daemons"
-      m.file "daemons", "script/daemons", :chmod => 0755
-      m.template "script.rb", "lib/daemons/#{file_name}.rb", :chmod => 0755
-      m.template "script_ctl", "lib/daemons/#{file_name}_ctl", :chmod => 0755
-      m.file "daemons.yml", "config/daemons.yml"
-    end
-  end
-end
\ No newline at end of file
diff --git a/vendor/generators/daemon/templates/daemons b/vendor/generators/daemon/templates/daemons
deleted file mode 100644 (file)
index feb98b6..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/usr/bin/env ruby
-Dir[File.dirname(__FILE__) + "/../lib/daemons/*_ctl"].each {|f| `#{f} #{ARGV.first}`}
\ No newline at end of file
diff --git a/vendor/generators/daemon/templates/daemons.yml b/vendor/generators/daemon/templates/daemons.yml
deleted file mode 100644 (file)
index c9f78f5..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-dir_mode: script
-dir: ../../log
-multiple: false
-backtrace: true
-monitor: true
\ No newline at end of file
diff --git a/vendor/generators/daemon/templates/script.rb b/vendor/generators/daemon/templates/script.rb
deleted file mode 100755 (executable)
index c3cd9b0..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/usr/bin/env ruby
-
-#You might want to change this
-ENV["RAILS_ENV"] ||= "production"
-
-require File.dirname(__FILE__) + "/../../config/environment"
-
-$running = true;
-Signal.trap("TERM") do 
-  $running = false
-end
-
-while($running) do
-  
-  # Replace this with your code
-  ActiveRecord::Base.logger << "This daemon is still running at #{Time.now}.\n"
-  
-  sleep 10
-end
\ No newline at end of file
diff --git a/vendor/generators/daemon/templates/script_ctl b/vendor/generators/daemon/templates/script_ctl
deleted file mode 100755 (executable)
index 058f618..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/usr/bin/env ruby
-require 'rubygems'
-require "daemons"
-require 'yaml'
-require 'erb'
-
-class Hash
-  def with_symbols!
-    self.keys.each{|key| self[key.to_s.to_sym] = self[key] }; self
-  end
-end
-
-options = YAML.load(
-  ERB.new(
-  IO.read(
-  File.dirname(__FILE__) + "/../../config/daemons.yml"
-  )).result).with_symbols!
-options[:dir_mode] = options[:dir_mode].to_sym
-
-Daemons.run File.dirname(__FILE__) + '/<%=file_name%>.rb', options
\ No newline at end of file