Created
June 7, 2020 16:01
-
-
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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