diff --git a/data/export/initscript/master.erb b/data/export/initscript/master.erb index 72dfbbc..aa3f9a5 100644 --- a/data/export/initscript/master.erb +++ b/data/export/initscript/master.erb @@ -51,12 +51,12 @@ do_start() # Start: <%= app %>.<%= name %>.<%= num %> # Create $PIDDIR/<%= name %>.<%= num %>.pid if [ ! -f $PID_DIR/<%= name %>-<%= num %>.pid ]; then - echo -n "<%= name %>-<%= num %>" + echo -n "<%= name %>-<%= num %> " su - $USERNAME -c 'cd <%= engine.root %>; export PORT=<%= engine.port_for(process, num) %>;<% engine.environment.each_pair do |var,env| %> export <%= var.upcase %>=<%= env %>; <% end %> <%= process.command %> >> <%= log %>/<%=name%>-<%=num%>.log 2>&1 & echo $!' > $PIDDIR/<%= name %>.<%= num %>.pid fi <% end %> <% end %> - echo " done" + echo "done" } # @@ -71,13 +71,13 @@ do_stop() <% 1.upto(engine.formation[name]) do |num| %> # STOP CONCURRENT: <%= num %> # Stop: <%= app %>.<%= name %>.<%= num %> - echo -n "<%= name %>-<%= num %>" + echo -n "<%= name %>-<%= num %> " kill `cat $PIDDIR/<%= name %>.<%= num %>.pid` rm $PIDDIR/<%= name %>.<%= num %>.pid <% end %> <% end %> rmdir $PIDDIR - echo " done" + echo "done" } case "$1" in