Add pre-check for repository initialization in systemd service template (#11)
Co-authored-by: Karim BAIDI <karim@linux-man.fr>
This commit is contained in:
parent
f7a45a9f7a
commit
35d84f2f7f
1 changed files with 2 additions and 0 deletions
|
@ -19,6 +19,8 @@ Environment="AWS_ACCESS_KEY_ID={{ restic_aws_access_key_id}}"
|
|||
Environment="AWS_SECRET_ACCESS_KEY={{ restic_aws_secret_access_key}}"
|
||||
{% endif %}
|
||||
|
||||
ExecStartPre=/bin/sh -c '{{ restic_path }} snapshots || {{ restic_path }} init'
|
||||
|
||||
{% if restic_check %}
|
||||
ExecStartPre={{ restic_path }} check
|
||||
{% endif -%}
|
||||
|
|
Loading…
Reference in a new issue