diff --git a/jibri/rootfs/etc/services.d/30-jibri/finish b/jibri/rootfs/etc/services.d/30-jibri/finish new file mode 100755 index 0000000..ca3475b --- /dev/null +++ b/jibri/rootfs/etc/services.d/30-jibri/finish @@ -0,0 +1,9 @@ +#!/usr/bin/with-contenv bash + +# When jibri is shutdown (or gracefully shutdown), it exits with code 255. +# In this case, we don't want S6 to restart the service. We want to stop all +# services and shutdown the container. + +if [[ $1 -eq 255 ]]; then + s6-svscanctl -t /var/run/s6/services +fi