[erlang-questions] rebar vs. escript vs. service vs. init.d
Thu Mar 8 01:28:46 CET 2012
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?
-=-=- dave@REDACTED -=-=-
More information about the erlang-questions