Skip to content

Commit 40ff4d2

Browse files
committed
Make start-nginx scripts ignore the SIGTERM signal so they do not kill off nginx abruptly.
1 parent 14ccd81 commit 40ff4d2

File tree

4 files changed

+7
-0
lines changed

4 files changed

+7
-0
lines changed

bin/start-nginx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/usr/bin/env bash
22

3+
trap "echo start-nginx got SIGTERM. Ignoring while nginx shuts down gracefully" SIGTERM
4+
35
psmgr=/tmp/nginx-buildpack-wait
46
rm -f $psmgr
57
mkfifo $psmgr

bin/start-nginx-debug

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/usr/bin/env bash
22

3+
trap "echo start-nginx-debug got SIGTERM. Ignoring while nginx shuts down gracefully" SIGTERM
4+
35
psmgr=/tmp/nginx-buildpack-wait
46
rm -f $psmgr
57
mkfifo $psmgr

bin/start-nginx-solo

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/usr/bin/env bash
22

3+
trap "echo start-nginx-solo got SIGTERM. Ignoring while nginx shuts down gracefully" SIGTERM
4+
35
psmgr=/tmp/nginx-buildpack-wait
46
rm -f $psmgr
57
mkfifo $psmgr

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77
## [x.x] - xxxx-xx-xx
88
### Changes
99
- [all] Patched nginx so it gracefully shuts down on SIGTERM.
10+
- [all] start-nginx scripts ignore the SIGTERM signal so they do not kill off nginx abruptly.
1011

1112
## [1.7] - 2021-06-04
1213
### Changes

0 commit comments

Comments
 (0)