mirror of
https://github.com/TrezOne/docker-mods-uptime-kuma-timeout-fix.git
synced 2026-06-18 22:33:00 -04:00
Replace sed with array parsing to properly handle multiple paths with spaces
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
if [ -n "${LOGS_TO_STDOUT}" ]; then
|
||||
TAIL_LOGS=$(echo "$LOGS_TO_STDOUT" | sed 's#|# #g')
|
||||
echo "Executing: tail -F $TAIL_LOGS"
|
||||
tail -F "$TAIL_LOGS"
|
||||
IFS='|' read -ra PATH_ARRAY <<< "$LOGS_TO_STDOUT"
|
||||
echo "Executing: tail -F ${PATH_ARRAY[@]}"
|
||||
tail -F "${PATH_ARRAY[@]}"
|
||||
else
|
||||
echo "**** Env var LOGS_TO_STDOUT is not set, sleeping ****"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user