mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-23 17:21:56 +02:00
templates: replace s6-svwait
This commit is contained in:
13
scrutiny/rootfs/etc/services.d/nginx/finish
Normal file → Executable file
13
scrutiny/rootfs/etc/services.d/nginx/finish
Normal file → Executable file
@@ -1,8 +1,9 @@
|
||||
#!/usr/bin/execlineb -S0
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
# ==============================================================================
|
||||
# Take down the S6 supervision tree when Nginx fails
|
||||
# Stop the container when Nginx fails
|
||||
# ==============================================================================
|
||||
if { s6-test ${1} -ne 0 }
|
||||
if { s6-test ${1} -ne 256 }
|
||||
|
||||
s6-svscanctl -t /var/run/s6/services
|
||||
if [[ "$1" -ne 0 && "$1" -ne 256 ]]; then
|
||||
bashio::log.error "Nginx exited with code $1"
|
||||
kill -15 1
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user