[erlang-questions] rebar vs. escript vs. service vs. init.d

Jeremy Raymond <>
Thu Mar 8 02:15:44 CET 2012


I recall having to update the generated start script as well with the
full path to get it to work as an init.d startup script. Same issues.

--
Jeremy

On Mar 7, 2012, at 7:29 PM, David Goehrig <> wrote:

> I ran into an interesting bug today where in the default init script generated by rebar was experiencing some distress.
>
> A word about my setup, all of the versions of my app are in /opt/[appname]/[version]/ and the script was altered to not pwd as it was trying to look for /etc/etc/vm.args as a result when started by the service script. Invoking it via full path worked, as did /etc/init.d/appname after fixing the auto-discovered path.
>
> Once the paths worked escript failed to exec when run by service and the runner failed due to HOME not being defined when run by the service script. But most interestingly, it returned status 0, which caused puppet to erroneously report as successful.  The solution was to update sysconfig to fake a HOME.
>
> This whole curious enterprise ultimately derives from some interesting assumptions about how the scripts should discover their environment.
>
> Has anyone else run into similar issues?
>
> -=-=-  -=-=-
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions



More information about the erlang-questions mailing list