From 7cb034ec9d70d46b938ea91195b7c3e788b3f1d2 Mon Sep 17 00:00:00 2001 From: Michael Sofaer <msofaer@pivotallabs.com> Date: Thu, 4 Nov 2010 19:49:52 -0700 Subject: [PATCH] Start the thin and the websocket server with dt --- chef/cookbooks/common/recipes/daemontools.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/chef/cookbooks/common/recipes/daemontools.rb b/chef/cookbooks/common/recipes/daemontools.rb index ca385908c2..2f2664eb7f 100644 --- a/chef/cookbooks/common/recipes/daemontools.rb +++ b/chef/cookbooks/common/recipes/daemontools.rb @@ -12,3 +12,17 @@ end execute "executable" do command "chmod -R 755 /service/mongo" end + +execute "thin run" do + command "mkdir -p /service/thin && echo '#!/bin/sh' > /service/thin/run && echo 'exec /usr/local/bin/ruby /usr/local/bin/thin start -c /usr/local/app/diaspora -p80' >> /service/thin/run" +end +execute "executable" do + command "chmod -R 755 /service/thin" +end + +execute "websocket run" do + command "mkdir -p /service/websocket && echo '#!/bin/sh' > /service/websocket/run && echo 'cd /usr/local/app/diaspora && exec /usr/local/bin/ruby /usr/local/app/diaspora/script/websocket_server.rb' >> /service/websocket/run" +end +execute "executable" do + command "chmod -R 755 /service/websocket" +end \ No newline at end of file -- GitLab