@redsymbol your site has a TLS certificate error. On Chrome I get NET::ERR_CERT_COMMON_NAME_INVALID because your certificate is from mobilewebup.com
Otherwise a good article. I use the following code to enable passing the signal name to the trap handler, so that I can kill the Bash process with the correct signal name, which is best practice for Unix signal handling (EXIT would have to be handled specially in `sig_rekill`):
# Set trap for several signals and pass signal name to trap function.
# https://stackoverflow.com/a/2183063/207384
trap_with_arg() {
func="$1" ; shift
for sig ; do
trap "$func $sig" "$sig"
done
}
sig_rekill() {
# Kill whole process group.
trap "$1"; kill -"$1" -$$
}
# Catch signal and kill whole process group.
trap_with_arg sig_rekill HUP INT QUIT PIPE TERM
Otherwise a good article. I use the following code to enable passing the signal name to the trap handler, so that I can kill the Bash process with the correct signal name, which is best practice for Unix signal handling (EXIT would have to be handled specially in `sig_rekill`):