From 14eb8c12cf72d3d8e83c2e55b309936f36873867 Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Thu, 21 Nov 2019 17:47:33 +0100 Subject: [PATCH] fix: [logrotate] avoid circular dependence in final ``docker-compose.yml`` Signed-off-by: Valentin Lab --- logrotate/hooks/log_rotate-relation-joined | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/logrotate/hooks/log_rotate-relation-joined b/logrotate/hooks/log_rotate-relation-joined index 3cbe487a..0deacd1b 100755 --- a/logrotate/hooks/log_rotate-relation-joined +++ b/logrotate/hooks/log_rotate-relation-joined @@ -4,12 +4,14 @@ ## if I'm linked to a schedule-command, then add the scheduler dependency to source service if read-0 ts _ _ < <(get_service_relation "$SERVICE_NAME" "schedule-command"); then - config-add "\ + if [ "$ts" != "$MASTER_BASE_SERVICE_NAME" ]; then + config-add "\ services: $MASTER_BASE_SERVICE_NAME: depends_on: - \"$ts\" " + fi fi exit 0