Skip to content

Commit

Permalink
Use exec in the command line, avoid bash process (#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
GioF71 authored Sep 21, 2024
1 parent ff1a965 commit 2a4603f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@ Just be careful to use the tag you have built.

Change Date|Major Changes
---|---
2024-09-21|Use exec instead of eval
2024-09-05|Handle non-writable volumes more gracefully
2024-09-05|Fix user and group management
2024-03-07|Fix switch for normalisation pregain (see [#81](https://github.com/GioF71/librespot-docker/issues/77))
Expand Down
6 changes: 3 additions & 3 deletions app/bin/run-librespot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -300,12 +300,12 @@ fi
if [[ $current_user_id -eq 0 ]]; then
if [[ "${BACKEND}" == "pulseaudio" || -n "${PUID}" ]]; then
echo "Running in user mode ..."
su - $USER_NAME -c "$CMD_LINE"
exec su - $USER_NAME -c "$CMD_LINE"
else
echo "Running as root ..."
eval $CMD_LINE;
eval "exec $CMD_LINE";
fi
else
echo "Running as uid: [$current_user_id] ..."
eval $CMD_LINE
eval "exec $CMD_LINE"
fi

0 comments on commit 2a4603f

Please sign in to comment.