From 18ddf2d439938796cf5053d731df50a277868029 Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Tue, 18 Dec 2018 10:01:21 +0100 Subject: [PATCH] new: [logrotate] add scheduler dependency to base services --- logrotate/hooks/log_rotate-relation-joined | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/logrotate/hooks/log_rotate-relation-joined b/logrotate/hooks/log_rotate-relation-joined index 488c59f2..3cbe487a 100755 --- a/logrotate/hooks/log_rotate-relation-joined +++ b/logrotate/hooks/log_rotate-relation-joined @@ -2,7 +2,18 @@ ## Should be executable N time in a row with same result. +## 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 "\ +services: + $MASTER_BASE_SERVICE_NAME: + depends_on: + - \"$ts\" +" +fi + exit 0 + . lib/common set -e