Upstart has job environment and event environment, I am faimilar with the jobs, and I can write script
stanzas to log/exec. But when the process fails, there is a stopped
event, which has some useful environment variables - like EXIT_STATUS
/EXIT_SIGNAL
, which I don't know if I can log!. These are not available in the post-stop
/pre-stop
stanzas. So, is there any other way where I can access these variables and log them?
Thanks.
In another job that has the stanza
start on stopped main-job
. Then in that job the script sections will have those environment variables.