[erlang-questions] erlang startup problem on Ubuntu Feisty / XEN

Attila Babo <>
Sun Jul 8 14:26:06 CEST 2007


On Feisty Fawn I'm using upstart - http://upstart.ubuntu.com/ - to start my
code without any problem with R11B5. Never tried tried the CEAN version, but
either official or locally complied erlangs are fine in this way.

Here is a simple version, just add add a similar text file with 644
privileges to your /etc/event.d folder like this:

start on my-service

start on runlevel 2
start on runlevel 3

stop on runlevel 0
stop on runlevel 1
stop on runlevel 4
stop on runlevel 5
stop on runlevel 6

script
        HOME=/usr/local/my-service
        export HOME
        cd $HOME
        /erlang/bin/erl -noshell -s main
end script

To start it for test use sudo initctl emit my-service or sudo initctl start
xxx, where xxx is your scripts file name from event.d folder.

I hope this helps, any comments are welcome!
Attila
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20070708/825b7ef0/attachment.html>


More information about the erlang-questions mailing list