diff --git a/app/bin/cmd-line-builder.sh b/app/bin/cmd-line-builder.sh index ecd51cf..c8c9b1d 100644 --- a/app/bin/cmd-line-builder.sh +++ b/app/bin/cmd-line-builder.sh @@ -49,7 +49,7 @@ function cmdline-timeout() { CMD_LINE="$CMD_LINE -C "$(quote_if_needed "${SQUEEZELITE_TIMEOUT}") } -function cmdline-mac-address() { +function cmdline_mac_address() { if [ -z "${SQUEEZELITE_MAC_ADDRESS}" ]; then echo "Variable SQUEEZELITE_MAC_ADDRESS not specified" else diff --git a/app/bin/run-squeezelite-alsa.sh b/app/bin/run-squeezelite-alsa.sh index 3cb4202..7fd4fa7 100644 --- a/app/bin/run-squeezelite-alsa.sh +++ b/app/bin/run-squeezelite-alsa.sh @@ -341,13 +341,13 @@ else fi handle_mac_address -cmdline-mac-address +cmdline_mac_address echo "Command Line: ["$CMD_LINE"]" if [[ $actual_user_mode -eq 1 ]]; then chown -R $USER_NAME:$GROUP_NAME /config - su - $USER_NAME -c "$CMD_LINE" + exec su - $USER_NAME -c "$CMD_LINE" else - eval $CMD_LINE + eval "exec $CMD_LINE" fi diff --git a/app/bin/run-squeezelite-pulse.sh b/app/bin/run-squeezelite-pulse.sh index b674aae..c3ed032 100644 --- a/app/bin/run-squeezelite-pulse.sh +++ b/app/bin/run-squeezelite-pulse.sh @@ -115,10 +115,10 @@ source logging.sh add_log_categories handle_mac_address -cmdline-mac-address +cmdline_mac_address echo "Command Line: ["$CMD_LINE"]" chown -R $USER_NAME:$GROUP_NAME /config -su - $USER_NAME -c "$CMD_LINE" +exec su - $USER_NAME -c "$CMD_LINE" diff --git a/app/bin/run-squeezelite.sh b/app/bin/run-squeezelite.sh index 87b2296..f37b5a9 100755 --- a/app/bin/run-squeezelite.sh +++ b/app/bin/run-squeezelite.sh @@ -26,10 +26,10 @@ echo "Ready to start." if [ "${SQUEEZELITE_MODE^^}" == "${SQUEEZELITE_MODE_ALSA^^}" ]; then echo "Using ALSA mode"; - /app/bin/run-squeezelite-alsa.sh; + exec /app/bin/run-squeezelite-alsa.sh; elif [ "${SQUEEZELITE_MODE^^}" == "${SQUEEZELITE_MODE_PULSE^^}" ]; then echo "Using PULSE mode"; - /app/bin/run-squeezelite-pulse.sh; + exec /app/bin/run-squeezelite-pulse.sh; else echo "Invalid mode ["$SQUEEZELITE_MODE"]"; exit 2; diff --git a/doc/release.md b/doc/release.md index 5dc38fb..5c15c38 100644 --- a/doc/release.md +++ b/doc/release.md @@ -10,6 +10,7 @@ Older build might be dropped in order to save space on docker-hub and incur in l Date|Type|Description :---|:---|:--- +2024-09-21|Improvement|Use exec instead of eval, avoid bash process 2024-06-01|Update|Sourceforge binaries version bump (see [#313](https://github.com/GioF71/squeezelite-docker/issues/313)) 2024-06-01|Update|Sourceforge binaries version bump (see [#311](https://github.com/GioF71/squeezelite-docker/issues/311)) 2024-04-20|Maintenance|Fix R2 build (see [#306](https://github.com/GioF71/squeezelite-docker/issues/306))