Corrected in template
This commit is contained in:
parent
41477e8453
commit
b6111a1bdc
@ -19,7 +19,6 @@ PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
||||
DESC="Runs <%= app %>"
|
||||
NAME=<%= app %>
|
||||
PIDDIR=/var/run/$NAME
|
||||
LOGDIR=<%= log_root %>
|
||||
SCRIPTNAME=/etc/init.d/$NAME
|
||||
USERNAME=<%= user %>
|
||||
|
||||
@ -40,8 +39,8 @@ USERNAME=<%= user %>
|
||||
do_start()
|
||||
{
|
||||
mkdir -p $PIDDIR
|
||||
mkdir -p $LOGDIR
|
||||
chown $USERNAME: $LOGDIR
|
||||
mkdir -p <%= log_root %>
|
||||
chown $USERNAME: <%= log_root %>
|
||||
# START APPLICATION: <%= app %>
|
||||
<% engine.procfile.entries.each do |process| %>
|
||||
# START PROCESS: <%= process.name %>
|
||||
@ -49,7 +48,7 @@ do_start()
|
||||
# START CONCURRENT: <%= num %>
|
||||
# Start: <%= app %>.<%= process.name %>.<%= num %>
|
||||
# Create $PIDDIR/<%= process.name %>.<%= num %>.pid
|
||||
su - $USERNAME -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 %> >> $LOGDIR/<%=process.name%>-<%=num%>.log 2>&1 & echo $!' > $PIDDIR/<%= process.name %>.<%= num %>.pid
|
||||
su - $USERNAME -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 %>
|
||||
|
||||
|
@ -19,7 +19,6 @@ PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
||||
DESC="Runs app"
|
||||
NAME=app
|
||||
PIDDIR=/var/run/$NAME
|
||||
LOGDIR=/var/log/app
|
||||
SCRIPTNAME=/etc/init.d/$NAME
|
||||
USERNAME=app
|
||||
|
||||
@ -40,8 +39,8 @@ USERNAME=app
|
||||
do_start()
|
||||
{
|
||||
mkdir -p $PIDDIR
|
||||
mkdir -p $LOGDIR
|
||||
chown $USERNAME: $LOGDIR
|
||||
mkdir -p /var/log/app
|
||||
chown $USERNAME: /var/log/app
|
||||
# START APPLICATION: app
|
||||
|
||||
# START PROCESS: alpha
|
||||
@ -49,7 +48,7 @@ do_start()
|
||||
# START CONCURRENT: 1
|
||||
# Start: app.alpha.1
|
||||
# Create $PIDDIR/alpha.1.pid
|
||||
su - $USERNAME -c 'cd /tmp/app; export PORT=5000; ./alpha >> $LOGDIR/alpha-1.log 2>&1 & echo $!' > $PIDDIR/alpha.1.pid
|
||||
su - $USERNAME -c 'cd /tmp/app; export PORT=5000; ./alpha >> /var/log/app/alpha-1.log 2>&1 & echo $!' > $PIDDIR/alpha.1.pid
|
||||
|
||||
|
||||
# START PROCESS: bravo
|
||||
@ -57,7 +56,7 @@ do_start()
|
||||
# START CONCURRENT: 1
|
||||
# Start: app.bravo.1
|
||||
# Create $PIDDIR/bravo.1.pid
|
||||
su - $USERNAME -c 'cd /tmp/app; export PORT=5100; ./bravo >> $LOGDIR/bravo-1.log 2>&1 & echo $!' > $PIDDIR/bravo.1.pid
|
||||
su - $USERNAME -c 'cd /tmp/app; export PORT=5100; ./bravo >> /var/log/app/bravo-1.log 2>&1 & echo $!' > $PIDDIR/bravo.1.pid
|
||||
|
||||
|
||||
|
||||
|
@ -19,7 +19,6 @@ PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
||||
DESC="Runs app"
|
||||
NAME=app
|
||||
PIDDIR=/var/run/$NAME
|
||||
LOGDIR=/var/log/app
|
||||
SCRIPTNAME=/etc/init.d/$NAME
|
||||
USERNAME=app
|
||||
|
||||
@ -40,8 +39,8 @@ USERNAME=app
|
||||
do_start()
|
||||
{
|
||||
mkdir -p $PIDDIR
|
||||
mkdir -p $LOGDIR
|
||||
chown $USERNAME: $LOGDIR
|
||||
mkdir -p /var/log/app
|
||||
chown $USERNAME: /var/log/app
|
||||
# START APPLICATION: app
|
||||
|
||||
# START PROCESS: alpha
|
||||
@ -49,13 +48,13 @@ do_start()
|
||||
# START CONCURRENT: 1
|
||||
# Start: app.alpha.1
|
||||
# Create $PIDDIR/alpha.1.pid
|
||||
su - $USERNAME -c 'cd /tmp/app; export PORT=5000; ./alpha >> $LOGDIR/alpha-1.log 2>&1 & echo $!' > $PIDDIR/alpha.1.pid
|
||||
su - $USERNAME -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
|
||||
# Create $PIDDIR/alpha.2.pid
|
||||
su - $USERNAME -c 'cd /tmp/app; export PORT=5001; ./alpha >> $LOGDIR/alpha-2.log 2>&1 & echo $!' > $PIDDIR/alpha.2.pid
|
||||
su - $USERNAME -c 'cd /tmp/app; export PORT=5001; ./alpha >> /var/log/app/alpha-2.log 2>&1 & echo $!' > $PIDDIR/alpha.2.pid
|
||||
|
||||
|
||||
# START PROCESS: bravo
|
||||
|
Loading…
Reference in New Issue
Block a user