Simplify reloading the configuration with docker
Allow `docker kill -s HUP` and `docker-compose kill -s HUP` to reach the node process.
This commit is contained in:
@@ -10,6 +10,14 @@ handle() {
|
||||
|
||||
trap handle INT TERM
|
||||
|
||||
refresh() {
|
||||
SIGNAL=$(( $? - 128 ))
|
||||
echo "Caught signal ${SIGNAL}, refreshing"
|
||||
kill -s ${SIGNAL} $(pidof node) 2>/dev/null
|
||||
}
|
||||
|
||||
trap refresh HUP
|
||||
|
||||
if ! which -- "${1}"; then
|
||||
# first arg is not an executable
|
||||
xvfb-run -a --server-args="-screen 0 1024x768x24" -- node /app/ "$@" &
|
||||
|
||||
Reference in New Issue
Block a user