[erlang-questions] anybody know how to start erlang (cowboy) with launchd on mac.

Joe Armstrong erlang@REDACTED
Sat Feb 23 17:39:15 CET 2013


Brilliant - works like a charm. Thanks a lot

I have a few stupid questions

    - where does erlang standard output go to?
    - where do launchd error messages go to?
    - does this keep alive stuff and run at *really* work
      ie does it start the erlang node on reboot
      a quick test was pretty encouraging

     (so you don't need the heartbeat stuff on a mac just use launchd :-)

Cheers

/Joe


On Sat, Feb 23, 2013 at 11:37 AM, Tony Rogvall <tony@REDACTED> wrote:

> Here is the plist need to start rfzone, I guess you can modify it to start
> your stuff.
>
> ( I probably stole it from somewhere :-)
>
> /Tony
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
>   "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
> <plist version="1.0">
>   <dict>
>     <key>Label</key>
>     <string>se.seazone.rfzone</string>
>     <key>EnvironmentVariables</key>
>     <dict>
>       <key>DYLD_LIBRARY_PATH</key>
>       <string>/opt/local/lib:$DYLD_LIBRARY_PATH</string>
>       <key>ERL_LIBS</key>
>       <string>/Users/%USER%/erlang</string>
>     </dict>
>     <key>ProgramArguments</key>
>     <array>
>       <string>/opt/local/bin/erl</string>
>       <string>+Bd</string>
>       <string>-noinput</string>
>       <string>-config</string>
>       <string>/Users/%USER%/erlang/rfzone/sys</string>
>       <string>-sname</string>
>       <string>telld</string>
>       <string>-s</string>
>       <string>rfzone</string>
>     </array>
>     <key>UserName</key>
>     <string>%USER%</string>
>     <key>StandardOutPath</key>
>     <string>/dev/null</string>
>     <key>StandardErrorPath</key>
>     <string>/dev/null</string>
>     <key>RunAtLoad</key>
>     <true/>
>     <key>KeepAlive</key>
>     <true/>
>   </dict>
> </plist>
>
>
>
>
>
> On 22 feb 2013, at 19:31, Joe Armstrong <erlang@REDACTED> wrote:
>
> This is a mac mountain lion specific question
>
> The subject line says it all.
>
> 1) I give some magic command
>
> > launchctl load ~/Library/LaunchAgents/joe.experiment.plist
>
> This launches erlang/cowboy "on demand"
>
> 2) I fetch a web page from "http://localhost:11234"
>
> Erlang starts and starts cowboy
>
> Anybody know what the magic stuff in joe.experiments.plist is?
>
> Cheers
>
> /Joe
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
>
> "Installing applications can lead to corruption over time. Applications
> gradually write over each other's libraries, partial upgrades occur, user
> and system errors happen, and minute changes may be unnoticeable and
> difficult to fix"
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130223/6004ff9e/attachment.htm>


More information about the erlang-questions mailing list