From 5297edb57d7e6f749ee9285055c586ff288bdf4b Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Fri, 13 May 2022 18:07:16 +0200 Subject: [PATCH] Support new s6 overlay (#3630) * Support new s6 overlay * fix permission * using bashio --- rootfs/etc/cont-init.d/udev.sh | 0 rootfs/etc/services.d/supervisor/finish | 11 +++++++---- rootfs/etc/services.d/supervisor/run | 0 rootfs/etc/services.d/watchdog/finish | 11 +++++++---- rootfs/etc/services.d/watchdog/run | 0 5 files changed, 14 insertions(+), 8 deletions(-) mode change 100644 => 100755 rootfs/etc/cont-init.d/udev.sh mode change 100644 => 100755 rootfs/etc/services.d/supervisor/finish mode change 100644 => 100755 rootfs/etc/services.d/supervisor/run mode change 100644 => 100755 rootfs/etc/services.d/watchdog/finish mode change 100644 => 100755 rootfs/etc/services.d/watchdog/run diff --git a/rootfs/etc/cont-init.d/udev.sh b/rootfs/etc/cont-init.d/udev.sh old mode 100644 new mode 100755 diff --git a/rootfs/etc/services.d/supervisor/finish b/rootfs/etc/services.d/supervisor/finish old mode 100644 new mode 100755 index 437013ef4..f183a6cbc --- a/rootfs/etc/services.d/supervisor/finish +++ b/rootfs/etc/services.d/supervisor/finish @@ -1,8 +1,11 @@ -#!/usr/bin/execlineb -S1 +#!/usr/bin/env bashio # ============================================================================== # Take down the S6 supervision tree when Supervisor fails # ============================================================================== -if { s6-test ${1} -ne 100 } -if { s6-test ${1} -ne 256 } -redirfd -w 2 /dev/null s6-svscanctl -t /var/run/s6/services +if [[ "$1" -ne 100 ]] && [[ "$1" -ne 256 ]]; then + bashio::log.warning "Halt Supervisor" + /run/s6/basedir/bin/halt +fi + +bashio::log.info "Supervisor restart after closing" diff --git a/rootfs/etc/services.d/supervisor/run b/rootfs/etc/services.d/supervisor/run old mode 100644 new mode 100755 diff --git a/rootfs/etc/services.d/watchdog/finish b/rootfs/etc/services.d/watchdog/finish old mode 100644 new mode 100755 index 6d88cd808..1fdae3204 --- a/rootfs/etc/services.d/watchdog/finish +++ b/rootfs/etc/services.d/watchdog/finish @@ -1,8 +1,11 @@ -#!/usr/bin/execlineb -S1 +#!/usr/bin/env bashio # ============================================================================== # Take down the S6 supervision tree when Watchdog fails # ============================================================================== -if { s6-test ${1} -ne 0 } -if { s6-test ${1} -ne 256 } -s6-svscanctl -t /var/run/s6/services +if [[ "$1" -ne 0 ]] && [[ "$1" -ne 256 ]]; then + bashio::log.warning "Halt Supervisor (Wuff)" + /run/s6/basedir/bin/halt +fi + +bashio::log.info "Watchdog restart after closing" diff --git a/rootfs/etc/services.d/watchdog/run b/rootfs/etc/services.d/watchdog/run old mode 100644 new mode 100755