diff --git a/logrotate/hooks/log_rotate-relation-joined b/logrotate/hooks/log_rotate-relation-joined index 488c59f..3cbe487 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