diff options
author | Christoph Helma <helma@in-silico.ch> | 2013-06-21 10:30:31 +0200 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2013-06-21 10:30:31 +0200 |
commit | 79aa333837ff508ef67b445c7e3323bbfd3b2d6b (patch) | |
tree | 26ee0c894a923fa0b865cf95ed267ef074e41580 | |
parent | 202344520146c4b079b79eabfdafc42b989a9f77 (diff) |
unicorn configuration added
-rw-r--r-- | unicorn.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/unicorn.rb b/unicorn.rb new file mode 100644 index 0000000..e1d6aeb --- /dev/null +++ b/unicorn.rb @@ -0,0 +1,11 @@ +service = File.dirname(File.expand_path(__FILE__)).split('/').last +config_dir = "#{ENV['HOME']}/.opentox/config" +log_dir = "#{ENV['HOME']}/.opentox/log" +log_file = File.join log_dir, "#{service}.log" +require File.join config_dir, service +port = eval("$#{service}[:port]") +listen port +pid File.join(log_dir,"#{service}.pid") +stderr_path log_file +stdout_path log_file + |