Running a shell command when exiting an Elixir script

Why don’t you do the oposite? Call an Elixir Script from a Bash Script, and when it exits you can do anything.

You could even get the exit codes to do some logic.