Skip to content

Instantly share code, notes, and snippets.

@miquelbar
Created August 28, 2019 12:01
Show Gist options
  • Save miquelbar/1cdb245657f4ecc74608589b618804ee to your computer and use it in GitHub Desktop.
Save miquelbar/1cdb245657f4ecc74608589b618804ee to your computer and use it in GitHub Desktop.
#!/bin/sh
_sigterm() {
echo "Recieved SIGTERM"
exit 1
}
_sigint() {
echo "Recieved SIGINT"
exit 1
}
trap _sigterm TERM
trap _sigint INT
while true; do
echo "Sleeping"
sleep 1
done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment