Skip to content

Commit

Permalink
MEDIUM: Fix s6 IC finish script to handle non-fatal exit
Browse files Browse the repository at this point in the history
  • Loading branch information
dkorunic committed Jun 7, 2024
1 parent 354cf96 commit 3eb4d1e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions fs/etc/s6-overlay/s6-rc.d/ingress-controller/finish
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#!/command/with-contenv sh

echo "Ingress Controller exited with code ${1}, taking down the S6 supervision tree"
exec /run/s6/basedir/bin/halt
if [ "${1}" -ne 0 ] && [ "${1}" -ne 256 ]; then
echo "Ingress Controller exited with fatal code ${1}, taking down the S6 supervision tree"

exec /run/s6/basedir/bin/halt
fi

echo "Ingress Controller exited with code ${1}, restarting..."

0 comments on commit 3eb4d1e

Please sign in to comment.