From d23e6a2b791777642bdd0e2a23cd3eac0d58e615 Mon Sep 17 00:00:00 2001 From: Matthias Wirth Date: Tue, 6 Aug 2024 21:57:36 +0200 Subject: [PATCH] use stop_service from common scripts instead of exec sleep inf --- rootfs/etc/s6-overlay/scripts/airspy_adsb | 6 +++--- rootfs/etc/s6-overlay/scripts/nginx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rootfs/etc/s6-overlay/scripts/airspy_adsb b/rootfs/etc/s6-overlay/scripts/airspy_adsb index ab2adcd..1333114 100755 --- a/rootfs/etc/s6-overlay/scripts/airspy_adsb +++ b/rootfs/etc/s6-overlay/scripts/airspy_adsb @@ -142,7 +142,7 @@ if [[ -z "$AIRSPY_ADSB_ARCH" ]]; then else "${s6wrap[@]}" echo "ERROR: Unsupported architecture: $(uname -m)!" - exec sleep infinity + stop_service fi fi @@ -152,13 +152,13 @@ AIRSPY_ADSB_BIN="/usr/local/bin/airspy_adsb.${AIRSPY_ADSB_ARCH}" # Ensure binary exists if [[ ! -x "$AIRSPY_ADSB_BIN" ]]; then "${s6wrap[@]}" echo "ERROR: Executable binary not found for architecture: $AIRSPY_ADSB_ARCH!" - exec sleep infinity + stop_service fi # Ensure binary runnable if ! "$AIRSPY_ADSB_BIN" -h > /dev/null 2>&1; then "${s6wrap[@]}" echo "ERROR: Executable $AIRSPY_ADSB_ARCH binary not supported on $(uname -m) architecture!" - exec sleep infinity + stop_service fi # Execute binary with arguments prepared above diff --git a/rootfs/etc/s6-overlay/scripts/nginx b/rootfs/etc/s6-overlay/scripts/nginx index bcfbac3..b152613 100755 --- a/rootfs/etc/s6-overlay/scripts/nginx +++ b/rootfs/etc/s6-overlay/scripts/nginx @@ -4,7 +4,7 @@ source /scripts/common if ! chk_enabled "${AIRSPY_ADSB_STATS}"; then - exec sleep infinity + stop_service fi exec s6wrap --quiet --prepend=nginx --timestamps --args /usr/sbin/nginx