Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use exec to startup service programs so s6 service stop works correctly #102

Merged
merged 1 commit into from
Mar 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions rootfs/etc/s6-overlay/scripts/lighttpd
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ if [[ -z "$DISABLE_WEBAPP" ]]; then
set -eo pipefail

#shellcheck disable=SC2016
s6wrap --quiet --timestamps --prepend="$(basename "$0")" --args s6-setuidgid nobody /usr/sbin/lighttpd \
exec s6wrap --quiet --timestamps --prepend="$(basename "$0")" --args s6-setuidgid nobody /usr/sbin/lighttpd \
-f /etc/lighttpd/lighttpd.conf \
-D

# If webapp disabled, sleep forever
else
sleep infinity
exec sleep infinity
fi
2 changes: 1 addition & 1 deletion rootfs/etc/s6-overlay/scripts/skyaware978
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ fi

"${s6wrap[@]}" echo "invoking: $SKY_BIN ${SKY_ARGS[*]}"
# shellcheck disable=SC2068
"${s6wrap[@]}" $SKY_BIN ${SKY_ARGS[@]}
exec "${s6wrap[@]}" $SKY_BIN ${SKY_ARGS[@]}
2 changes: 1 addition & 1 deletion rootfs/etc/s6-overlay/scripts/stats
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ fi
sleep 5

# shellcheck disable=SC2016
s6wrap --quiet --timestamps --prepend="$(basename "$0")" --args python3 -u /scripts/stats.py
exec s6wrap --quiet --timestamps --prepend="$(basename "$0")" --args python3 -u /scripts/stats.py
2 changes: 1 addition & 1 deletion rootfs/etc/s6-overlay/scripts/telegraf
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ if [[ -n "$INFLUXDBURL" ]] || [ -n "$ENABLE_PROMETHEUS" ]; then
--config-directory /etc/telegraf/telegraf.d \
| grep -v "Error in plugin"
else
sleep infinity
exec sleep infinity
fi
6 changes: 3 additions & 3 deletions rootfs/etc/s6-overlay/scripts/telegraf_socat
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set -eo pipefail

# If the telegraf binary is not present, then do nothing:
if [[ ! -f /usr/bin/telegraf ]]; then
sleep infinity
exec sleep infinity
fi

if [ -z "$INFLUXDB_SKIP_AIRCRAFT" ] && { [ -n "$INFLUXDBURL" ] || [ -n "$ENABLE_PROMETHEUS" ]; } then
Expand All @@ -23,8 +23,8 @@ if [ -z "$INFLUXDB_SKIP_AIRCRAFT" ] && { [ -n "$INFLUXDBURL" ] || [ -n "$ENABLE_
SOCAT_CMD+=("TCP:localhost:33979")

# shellcheck disable=SC2016
s6wrap --quiet --timestamps --prepend="$(basename "$0")" --args "${SOCAT_BIN}" "${SOCAT_CMD[@]}"
exec s6wrap --quiet --timestamps --prepend="$(basename "$0")" --args "${SOCAT_BIN}" "${SOCAT_CMD[@]}"

else
sleep infinity
exec sleep infinity
fi