110-startlogs.sh hotfix
This commit is contained in:
parent
6d9394e62d
commit
39c0f07fca
@ -6,6 +6,8 @@
|
||||
# Author: Kovács Zoltán <kovacsz@marcusconsulting.hu>
|
||||
# License: GNU/GPL v3+ (https://www.gnu.org/licenses/gpl-3.0.en.html)
|
||||
#
|
||||
# 2025-02-26 v0.1
|
||||
# fix: a silly typo (commandtring) blocked the startup.
|
||||
# 2025-02-02 v0.1 Initial release
|
||||
|
||||
# Accepted environment variables and their defaults.
|
||||
@ -90,7 +92,7 @@ else
|
||||
do
|
||||
if [ -n "$service" ]; then
|
||||
# Converts the service's name to an actual running container's name.
|
||||
container="$("$DOCKER" inspect -f '{{.Name}}' $(cd "$BASE_DIR"; "$DOCKER_COMPOSE" $commandtring ps -q "$service") | "$CUT" -c2-)"
|
||||
container="$("$DOCKER" inspect -f '{{.Name}}' $(cd "$BASE_DIR"; "$DOCKER_COMPOSE" $commandstring ps -q "$service") | "$CUT" -c2-)"
|
||||
# It will not start a new log if it already exists.
|
||||
if [ -z "$("$PS" auxww | "$GREP" "$DOCKER" | "$GREP" 'logs' | "$GREP" "$container" )" ]; then
|
||||
"$DOCKER" logs -t -f $container >> "$BASE_DIR/$LOGDIR/$service.log" 2>&1 &
|
||||
|
Loading…
x
Reference in New Issue
Block a user