[systemd-devel] Main process exit status variables not being sent to ExecStopPost= script

Tomasz Torcz tomek at pipebreaker.pl
Fri Apr 7 13:31:30 UTC 2017


On Thu, Apr 06, 2017 at 08:55:05PM +0000, ithinki cant wrote:
> 
> Per systemd documentation, for ExecStopPost=, some environment variables are supposed to be set for the executed script/binary:
> 
> "Note that all commands that are configured with this setting are invoked with the result code of the service, as well as the main process' exit code and status, set in the $SERVICE_RESULT, $EXIT_CODE and $EXIT_STATUS environment variables"


   Those were introduced with v232.
 
> 
> I'm using systemd-231-2 on CentOS7, kernel 4.6.7
> Am I doing something wrong?

  The version you are using is too old. Ask you distributor to update it or backport
patches providing above mentione variables.
  Alternatively you can try to use Facebook's backport of latest systemd.

-- 
Tomasz Torcz                 "God, root, what's the difference?"
xmpp: zdzichubg at chrome.pl         "God is more forgiving."



More information about the systemd-devel mailing list