fix: reset MAILTO after a cron entry that sets its own
A task with its own `MAILTO` is now written in place, followed by a line resetting `MAILTO` to the global value, or to the `dokku` user when none is set, rather than grouped at the end of the crontab, so no other task is mailed to its recipient whatever order the tasks are written in.
This commit is contained in:
6 files changed
+89
-73
No files matched your search
@@ -8,11 +8,11 @@ PATH=/usr/local/bin:/usr/bin:/bin
|
||||
SHELL=/bin/bash
|
||||
|
||||
{{ range $task := .Tasks -}}
|
||||
{{ if $task.Mailto -}}
|
||||
MAILTO={{ $task.Mailto }}
|
||||
{{ end -}}
|
||||
{{ $task.Schedule }} {{ $task.DokkuRunCommand }}
|
||||
{{ end -}}
|
||||
{{ range $group := .MailtoGroups }}
|
||||
MAILTO={{ $group.Mailto }}
|
||||
{{ range $task := $group.Tasks -}}
|
||||
{{ $task.Schedule }} {{ $task.DokkuRunCommand }}
|
||||
{{ if $task.Mailto -}}
|
||||
MAILTO={{ $.ResetMailto }}
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
Reference in new issue
Block a user