backup stuff
This commit is contained in:
parent
01b83a80ec
commit
27e036eccd
16 changed files with 513 additions and 0 deletions
14
ansible/roles/backup_source/templates/backup.service.j2
Normal file
14
ansible/roles/backup_source/templates/backup.service.j2
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
[Unit]
|
||||
Description={{ backup_source_description }} backup
|
||||
{% if backup_source_stop_service %}
|
||||
{# systemd rejects a bare name here ("Failed to add dependency ... Invalid
|
||||
argument"), so normalise to a full unit name. #}
|
||||
After={{ backup_source_stop_service if '.' in backup_source_stop_service else backup_source_stop_service ~ '.service' }}
|
||||
{% endif %}
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/local/bin/{{ backup_source_name }}-backup.sh
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
SyslogIdentifier={{ backup_source_name }}-backup
|
||||
Loading…
Add table
Add a link
Reference in a new issue