I tried EXIT trap, it also executed when the script is killed with HUP, TERM and INT signals. I think it executes whenever the script exits, whether with 0 exit status or not.
-u option for journalctl can also be used to narrow down journal entries to a single systemd unit: journalctl -u hello.service
I tried EXIT trap, it also executed when the script is killed with HUP, TERM and INT signals. I think it executes whenever the script exits, whether with 0 exit status or not.