diff options
author | Christoph Helma <helma@in-silico.ch> | 2013-06-21 10:30:25 +0200 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2013-06-21 10:30:25 +0200 |
commit | e95451c825a941e524df0a496a742d13107dd51d (patch) | |
tree | 8048a889124d6016b60eac93f013f879a2998267 | |
parent | 64f833185d5b1a608fb0cf37d7e4c86ad8e6ec22 (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 + |