diff options
Diffstat (limited to 'netbox/etc/service/uwsgi/run')
-rwxr-xr-x | netbox/etc/service/uwsgi/run | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/netbox/etc/service/uwsgi/run b/netbox/etc/service/uwsgi/run deleted file mode 100755 index e24ede7..0000000 --- a/netbox/etc/service/uwsgi/run +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | # runsv sends us a TERM but uwsgi will only shutdown cleanly | ||
4 | # if it receives an INT so we need to translate the signal | ||
5 | # properly for uwsgi | ||
6 | trap 'kill -INT $PID' TERM | ||
7 | |||
8 | /usr/sbin/uwsgi --ini /etc/uwsgi/netbox.ini & | ||
9 | |||
10 | PID=$! | ||
11 | |||
12 | # wait for uwsgi, will get cancelled when runsv TERMs us and | ||
13 | # the trap will get executed next, unless something goes wrong | ||
14 | # and uwsgi fails then this wait will run | ||
15 | wait $PID | ||
16 | |||
17 | # if something went wrong then unregister the trap because it | ||
18 | # won't have a target | ||
19 | trap - TERM | ||
20 | |||
21 | # waiting on a dead process will return the return code of the | ||
22 | # processes original exit | ||
23 | wait $PID | ||