Skip to content

Commit 2a4603f

Browse files
authored
Use exec in the command line, avoid bash process (#86)
1 parent ff1a965 commit 2a4603f

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,7 @@ Just be careful to use the tag you have built.
346346

347347
Change Date|Major Changes
348348
---|---
349+
2024-09-21|Use exec instead of eval
349350
2024-09-05|Handle non-writable volumes more gracefully
350351
2024-09-05|Fix user and group management
351352
2024-03-07|Fix switch for normalisation pregain (see [#81](https://github.com/GioF71/librespot-docker/issues/77))

app/bin/run-librespot.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -300,12 +300,12 @@ fi
300300
if [[ $current_user_id -eq 0 ]]; then
301301
if [[ "${BACKEND}" == "pulseaudio" || -n "${PUID}" ]]; then
302302
echo "Running in user mode ..."
303-
su - $USER_NAME -c "$CMD_LINE"
303+
exec su - $USER_NAME -c "$CMD_LINE"
304304
else
305305
echo "Running as root ..."
306-
eval $CMD_LINE;
306+
eval "exec $CMD_LINE";
307307
fi
308308
else
309309
echo "Running as uid: [$current_user_id] ..."
310-
eval $CMD_LINE
310+
eval "exec $CMD_LINE"
311311
fi

0 commit comments

Comments
 (0)