summaryrefslogtreecommitdiffstats
path: root/roles/backup/templates/backup.service.j2
diff options
context:
space:
mode:
Diffstat (limited to 'roles/backup/templates/backup.service.j2')
-rw-r--r--roles/backup/templates/backup.service.j213
1 files changed, 13 insertions, 0 deletions
diff --git a/roles/backup/templates/backup.service.j2 b/roles/backup/templates/backup.service.j2
new file mode 100644
index 00000000..f35940b8
--- /dev/null
+++ b/roles/backup/templates/backup.service.j2
@@ -0,0 +1,13 @@
+[Unit]
+Description=Backup {{ backup_name }}
+After=network-online.target
+Wants=network-online.target
+
+[Service]
+Type=oneshot
+ExecStart=/usr/local/bin/{{ backup_name }}-backup
+User={{ backup_user }}
+Group={{ backup_group }}
+StandardOutput=journal
+StandardError=journal
+LoadCredential={{ backup_name }}-backup.env:/etc/credstore/{{ backup_name }}-backup.env