Skip to content

Commit

Permalink
use stop_service from common scripts instead of exec sleep inf
Browse files Browse the repository at this point in the history
  • Loading branch information
wiedehopf committed Aug 6, 2024
1 parent 4af84ef commit d23e6a2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions rootfs/etc/s6-overlay/scripts/airspy_adsb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion rootfs/etc/s6-overlay/scripts/nginx
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit d23e6a2

Please sign in to comment.