Skip to content

Instantly share code, notes, and snippets.

@amane-katagiri
Last active Aug 9, 2017
Embed
What would you like to do?
foregroundize script (useful in docker)
#!/bin/sh
trap 'echo "reload command"' HUP
trap 'echo "stop command"' EXIT
trap 'echo "stop command"; trap EXIT; exit 0' TERM INT
echo "start command which launches a background service and returns immediately"
while true; do sleep 3600 & wait; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment