2022-12-03 13:23:19 -03:00
|
|
|
#!/command/with-contenv bash
|
2022-11-21 22:31:39 -03:00
|
|
|
# shellcheck shell=bash
|
2022-12-07 10:47:40 -03:00
|
|
|
# Take down the S6 supervision tree when the service fails, or restart it
|
|
|
|
|
# otherwise
|
2021-03-03 07:33:50 -06:00
|
|
|
|
2022-11-21 22:31:39 -03:00
|
|
|
if [[ "${1}" -ne 0 && "${1}" -ne 256 ]]; then
|
2022-12-03 13:23:19 -03:00
|
|
|
exec /run/s6/basedir/bin/halt
|
2022-11-21 22:31:39 -03:00
|
|
|
fi
|