From 3519113ef9403d2f944b12fe51ac69e7c3623929 Mon Sep 17 00:00:00 2001 From: Aaron van Meerten Date: Tue, 19 Dec 2023 12:53:53 -0600 Subject: [PATCH] jvb: finish script for graceful shutdown (#1676) --- jvb/rootfs/etc/services.d/jvb/finish | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 jvb/rootfs/etc/services.d/jvb/finish diff --git a/jvb/rootfs/etc/services.d/jvb/finish b/jvb/rootfs/etc/services.d/jvb/finish new file mode 100644 index 0000000..9f7171a --- /dev/null +++ b/jvb/rootfs/etc/services.d/jvb/finish @@ -0,0 +1,9 @@ +#!/usr/bin/with-contenv bash + +# When the jvb is shutdown (or gracefully shutdown), it exits with code 0. +# 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 0 ]]; then + s6-svscanctl -t /var/run/s6/services +fi