Skip to content

Commit dca876d

Browse files
authored
Merge pull request #47 from mila-iqia/feat/client_run_before_after_job
feat: Add support of Client Run Before/After Job to Jobs
2 parents 2b853a6 + 68e875b commit dca876d

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ bareos_jobdefs:
150150
type: JOB_TYPE # optional, defaults to 'Backup'
151151
max_concurrent_jobs: 42 # optional, defaults to '50'
152152
allow_mixed_priority: 'yes' # optional
153+
client_run_before_job: "/etc/init.d/grafana-server stop" # optional
154+
client_run_after_job: "/etc/init.d/grafana-server start" # optional
153155
```
154156

155157
`bareos_jobs`: List of jobs in following format:

templates/bareos-dir/jobdefs/jobdef.conf.j2

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ Keep the legacy defaults when the template is used to define JobDefs resources
1919
{% if item.client is defined %}
2020
Client = {{ item.client }}
2121
{% endif %}
22+
{% if item.client_run_after_job is defined %}
23+
Client Run After Job = "{{ item.client_run_after_job }}"
24+
{% endif %}
25+
{% if item.client_run_before_job is defined %}
26+
Client Run Before Job = "{{ item.client_run_before_job }}"
27+
{% endif %}
2228
{% if item.fileset is defined %}
2329
FileSet = "{{ item.fileset }}"
2430
{% endif %}

0 commit comments

Comments
 (0)