This is our upstart script. It runs dtach with one listener which is used to log output of the app:<br><br><br>start on filesystem and net-device-up<br>stop on runlevel [06]<br><br>env HOME=/home/ubuntu<br>respawn<br>console output<br>
<br>script<br>exec start-stop-daemon --name ourappname --start --chuid nobody --exec /usr/bin/dtach -- -c /tmp/erl /usr/local/bin/ourapp > /var/log/ourapp.log<br>end script<br><br><br>/usr/local/bin/ourapp is just a normal script that runs erlang with -eval "application:start(ourapp,permanent)"<br>
<br>To attach to erlang just write: dtach -a /tmp/erl<br><br><br>Sergej<br><br><div class="gmail_quote">On Fri, Jan 6, 2012 at 10:32 PM, Zabrane Mickael <span dir="ltr"><<a href="mailto:zabrane3@gmail.com">zabrane3@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Could you please provide a usage example with Erlang?<br>
<br>
Regards,<br>
Zabrane<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
On Jan 6, 2012, at 10:27 PM, Rapsey wrote:<br>
<br>
> I just want to mention dtach. It's what we use and it works fantastic. Unlike screen you can have as many terminals attached to erlang as you want and gets in the way much less with special characters.<br>
><br>
><br>
> Sergej<br>
<br>
<br>
</div></div></blockquote></div><br>