From 4cfa5020d73751ee80099f10b2c46ea7c74c4fd0 Mon Sep 17 00:00:00 2001 From: TheThomaas Date: Sat, 5 Sep 2026 21:34:41 +0000 Subject: [PATCH] Ajouter cookcli/rootfs/etc/services.d/cookcli/finish --- cookcli/rootfs/etc/services.d/cookcli/finish | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 cookcli/rootfs/etc/services.d/cookcli/finish diff --git a/cookcli/rootfs/etc/services.d/cookcli/finish b/cookcli/rootfs/etc/services.d/cookcli/finish new file mode 100644 index 0000000..9fcbd55 --- /dev/null +++ b/cookcli/rootfs/etc/services.d/cookcli/finish @@ -0,0 +1,13 @@ +#!/usr/bin/with-contenv bashio +set -e + +EXIT_CODE=$1 +bashio::log.warning "CookCLI s'est arrêté avec le code ${EXIT_CODE}" + +if [ ${EXIT_CODE} -eq 0 ]; then + bashio::log.info "Arrêt normal de CookCLI" +else + bashio::log.warning "Redémarrage de CookCLI dans 5 secondes..." + sleep 5 + exit ${EXIT_CODE} +fi \ No newline at end of file