From 75cdf3be4b2f6deca454282b560ed16b8e964d70 Mon Sep 17 00:00:00 2001 From: Emile Cantin Date: Wed, 18 Apr 2012 12:43:32 -0400 Subject: [PATCH] Adjusted the command line --- data/export/initscript/master.erb | 3 +-- spec/resources/export/initscript/app | 6 ++---- spec/resources/export/initscript/app-concurrency | 6 ++---- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/data/export/initscript/master.erb b/data/export/initscript/master.erb index bdd37d4..6e58eed 100644 --- a/data/export/initscript/master.erb +++ b/data/export/initscript/master.erb @@ -44,9 +44,8 @@ do_start() <% 1.upto(concurrency[process.name]) do |num| %> # START CONCURRENT: <%= num %> # Start: <%= app %>.<%= process.name %>.<%= num %> - exec su - <%= user %> -c 'cd <%= engine.directory %>; export PORT=<%= engine.port_for(process, num, self.port) %>;<% engine.environment.each_pair do |var,env| %> export <%= var.upcase %>=<%= env %>; <% end %> <%= process.command %> >> <%= log_root %>/<%=process.name%>-<%=num%>.log 2>&1 &' # Create $PIDDIR/<%= process.name %>.<%= num %>.pid - echo $! > $PIDDIR/<%= process.name %>.<%= num %>.pid + exec su - <%= user %> -c 'cd <%= engine.directory %>; export PORT=<%= engine.port_for(process, num, self.port) %>;<% engine.environment.each_pair do |var,env| %> export <%= var.upcase %>=<%= env %>; <% end %> <%= process.command %> >> <%= log_root %>/<%=process.name%>-<%=num%>.log 2>&1 & echo $!' > $PIDDIR/<%= process.name %>.<%= num %>.pid <% end %> <% end %> diff --git a/spec/resources/export/initscript/app b/spec/resources/export/initscript/app index 205a8d8..0275bed 100644 --- a/spec/resources/export/initscript/app +++ b/spec/resources/export/initscript/app @@ -44,18 +44,16 @@ do_start() # START CONCURRENT: 1 # Start: app.alpha.1 - exec su - app -c 'cd /tmp/app; export PORT=5000; ./alpha >> /var/log/app/alpha-1.log 2>&1 &' # Create $PIDDIR/alpha.1.pid - echo $! > $PIDDIR/alpha.1.pid + exec su - app -c 'cd /tmp/app; export PORT=5000; ./alpha >> /var/log/app/alpha-1.log 2>&1 & echo $!' > $PIDDIR/alpha.1.pid # START PROCESS: bravo # START CONCURRENT: 1 # Start: app.bravo.1 - exec su - app -c 'cd /tmp/app; export PORT=5100; ./bravo >> /var/log/app/bravo-1.log 2>&1 &' # Create $PIDDIR/bravo.1.pid - echo $! > $PIDDIR/bravo.1.pid + exec su - app -c 'cd /tmp/app; export PORT=5100; ./bravo >> /var/log/app/bravo-1.log 2>&1 & echo $!' > $PIDDIR/bravo.1.pid diff --git a/spec/resources/export/initscript/app-concurrency b/spec/resources/export/initscript/app-concurrency index 80f00be..767d61c 100644 --- a/spec/resources/export/initscript/app-concurrency +++ b/spec/resources/export/initscript/app-concurrency @@ -44,16 +44,14 @@ do_start() # START CONCURRENT: 1 # Start: app.alpha.1 - exec su - app -c 'cd /tmp/app; export PORT=5000; ./alpha >> /var/log/app/alpha-1.log 2>&1 &' # Create $PIDDIR/alpha.1.pid - echo $! > $PIDDIR/alpha.1.pid + exec su - app -c 'cd /tmp/app; export PORT=5000; ./alpha >> /var/log/app/alpha-1.log 2>&1 & echo $!' > $PIDDIR/alpha.1.pid # START CONCURRENT: 2 # Start: app.alpha.2 - exec su - app -c 'cd /tmp/app; export PORT=5001; ./alpha >> /var/log/app/alpha-2.log 2>&1 &' # Create $PIDDIR/alpha.2.pid - echo $! > $PIDDIR/alpha.2.pid + exec su - app -c 'cd /tmp/app; export PORT=5001; ./alpha >> /var/log/app/alpha-2.log 2>&1 & echo $!' > $PIDDIR/alpha.2.pid # START PROCESS: bravo