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

Tony Rogvall tony@REDACTED
Sat Feb 23 11:37:01 CET 2013


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/bb6f4e17/attachment.htm>


More information about the erlang-questions mailing list