[erlang-questions] init.d script and a control script for starting an erlang app on boot in ubuntu

Matt Stancliff sysop@REDACTED
Mon Nov 16 07:55:38 CET 2009


Pablo,

On Nov 15, 2009, at 9:55 PM, Pablo Platt wrote:
> Can someone post a simple init.d script with a control script for an  
> erlang application on ubuntu?
>
> I'll appreciate an example for a control script that can start/stop/ 
> status/restart/reload(hot code update)/debug(attach an erlang shell).
> The script should also be able to restart the app (heart?).


   The best setup I've found for node scripting is from rabbitmq:
     Control script: http://hg.rabbitmq.com/rabbitmq-server/file/default/scripts/rabbitmqctl
     Control module: http://hg.rabbitmq.com/rabbitmq-server/file/default/src/rabbit_control.erl

   You can also check out how ejabberd does it, but the rabbitmq way  
looks cleaner:
     Control script: https://forge.process-one.net/browse/ejabberd/branches/ejabberd-2.1.x/tools/ejabberdctl?r=HEAD
     One control module: https://forge.process-one.net/browse/ejabberd/branches/ejabberd-2.1.x/src/ejabberd.erl?r=HEAD
     Other control module: https://forge.process-one.net/browse/ejabberd/branches/ejabberd-2.1.x/src/ejabberd_ctl.erl?r=HEAD


-Matt
-- 
Matt Stancliff                    San Jose, CA
AIM: seijimr              iPhone: 678-591-9337
"The best way to predict the future is to invent it." --Alan Kay



More information about the erlang-questions mailing list