Skip to content

Instantly share code, notes, and snippets.

@kalsan
Created June 7, 2020 16:01
Show Gist options
  • Select an option

  • Save kalsan/a18a63865f841145159b42cce094d43f to your computer and use it in GitHub Desktop.

Select an option

Save kalsan/a18a63865f841145159b42cce094d43f to your computer and use it in GitHub Desktop.
A small bash script that does nothing but can be interrupted quickly with SIGTERM. Great as an ENTRYPOINT to keep a Docker container running while developing / debugging.
#!/bin/bash
pid=
trap '[[ $pid ]] && kill "$pid"' EXIT
sleep infinity & pid=$!
wait
pid=
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment