Skip to content

Commit

Permalink
Make start-nginx scripts ignore the SIGTERM signal so they do not kil…
Browse files Browse the repository at this point in the history
…l off nginx abruptly.
  • Loading branch information
syastrov committed Aug 6, 2021
1 parent 14ccd81 commit 40ff4d2
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bin/start-nginx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env bash

trap "echo start-nginx got SIGTERM. Ignoring while nginx shuts down gracefully" SIGTERM

psmgr=/tmp/nginx-buildpack-wait
rm -f $psmgr
mkfifo $psmgr
Expand Down
2 changes: 2 additions & 0 deletions bin/start-nginx-debug
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env bash

trap "echo start-nginx-debug got SIGTERM. Ignoring while nginx shuts down gracefully" SIGTERM

psmgr=/tmp/nginx-buildpack-wait
rm -f $psmgr
mkfifo $psmgr
Expand Down
2 changes: 2 additions & 0 deletions bin/start-nginx-solo
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env bash

trap "echo start-nginx-solo got SIGTERM. Ignoring while nginx shuts down gracefully" SIGTERM

psmgr=/tmp/nginx-buildpack-wait
rm -f $psmgr
mkfifo $psmgr
Expand Down
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [x.x] - xxxx-xx-xx
### Changes
- [all] Patched nginx so it gracefully shuts down on SIGTERM.
- [all] start-nginx scripts ignore the SIGTERM signal so they do not kill off nginx abruptly.

## [1.7] - 2021-06-04
### Changes
Expand Down

0 comments on commit 40ff4d2

Please sign in to comment.