Skip to content

Instantly share code, notes, and snippets.

@sirhc
Created October 10, 2015 03:08
Show Gist options
  • Save sirhc/5aafdeb03bc62f572cd2 to your computer and use it in GitHub Desktop.
Save sirhc/5aafdeb03bc62f572cd2 to your computer and use it in GitHub Desktop.
#!/bin/bash -eu
show-config() {
readlink -f "$0"
}
trap 'exit 0' SIGINT
trap 'kill 0' EXIT
while :; do
sleep inf &
trap "{ kill $!; show-config; }" SIGHUP
wait || :
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment