Execute a command upon an event. More information: https://manned.org/trap.1posix.
trap
trap 'echo "Caught signal {{SIGHUP}}"' {{HUP}}
trap - {{HUP}} {{INT}}