[erlang-questions] Changing HEART_COMMAND on the fly
Mon Jan 25 18:15:22 CET 2010
2010/1/25 Scott Brooks <scott.brooks@REDACTED>
> We have a system in production using heart to monitor it.
> We have a bug in our startup scripts that we want to fix, but we don't want
> to take down the running node.
> Using heart:set_cmd(NewCmd) and then killing the existing server, I can get
> it to startup successfully with the new command, but unfortunately it
> retains the existing HEART_COMMAND environment variable, and so when the new
> node starts up, and I check heart:get_cmd(). It returns the old command.
> I tried a os:putenv(HEAT_COMMAND, NewCmd), and that looks like it adjusts
> the existing nodes environment fine, but since heart is what restarts the
> erlang node, it's using the HEART_COMMAND as it exists for the heart
> process, not the erlang node environment.
> I also tried killing off heart so I could restart it with a new
> environment, but that takes down the existing node.
Can you symlink the old heart command script to something which invokes the
More information about the erlang-questions