Also provide restic scripts as systemd global service

This commit is contained in:
Alexander Schäferdiek 2022-06-12 12:28:01 +02:00
parent 1d1aee1c6a
commit 458d48291f
8 changed files with 84 additions and 0 deletions

View file

@ -0,0 +1,9 @@
[Trigger]
Type = Package
Operation = Upgrade
Target = systemd
[Action]
Description = Gracefully upgrading systemd-boot...
When = PostTransaction
Exec = /usr/bin/systemctl restart systemd-boot-update.service

View file

@ -0,0 +1,16 @@
[Unit]
Description=Run restic check script for %I utilizing ~/.config/restic/%I-check.sh file using env ~/.config/restic/%I.env
OnFailure=systemd_failure_notify@%n.service
Wants=network-online.target
After=network-online.target
Requires=network-online.target
[Service]
Type=oneshot
ExecStart=sh %h/.config/restic/%I-check.sh
Environment="PATH=/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:%h/.bin"
Environment="SSH_AUTH_SOCK=/run/user/%u/keyring/ssh"
EnvironmentFile=%h/.config/restic/%I.env
[Install]
WantedBy=multi-user.target

View file

@ -0,0 +1,9 @@
[Unit]
Description=Run restic check script for %I utilizing HOME/.config/restic/%I-check.sh file
[Timer]
OnCalendar=Wed 22:00:00
Persistent=false
[Install]
WantedBy=timers.target

View file

@ -0,0 +1,16 @@
[Unit]
Description=Run restic create script for %I utilizing ~/.config/restic/%I-create.sh file using env ~/.config/restic/%I.env
OnFailure=systemd_failure_notify@%n.service
Wants=network-online.target
After=network-online.target
Requires=network-online.target
[Service]
Type=oneshot
ExecStart=sh %h/.config/restic/%I-create.sh
Environment="PATH=/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:%h/.bin"
Environment="SSH_AUTH_SOCK=/run/user/%u/keyring/ssh"
EnvironmentFile=%h/.config/restic/%I.env
[Install]
WantedBy=multi-user.target

View file

@ -0,0 +1,9 @@
[Unit]
Description=Run restic create script for %I utilizing HOME/.config/restic/%I-create.sh file
[Timer]
OnCalendar=23:00
Persistent=false
[Install]
WantedBy=timers.target

View file

@ -0,0 +1,16 @@
[Unit]
Description=Run restic check script for %I utilizing ~/.config/restic/%I-check.sh file using env ~/.config/restic/%I.env
OnFailure=systemd_failure_notify@%n.service
Wants=network-online.target
After=network-online.target
Requires=network-online.target
[Service]
Type=oneshot
ExecStart=sh %h/.config/restic/%I-check.sh
Environment="PATH=/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:%h/.bin"
Environment="SSH_AUTH_SOCK=/run/user/%u/keyring/ssh"
EnvironmentFile=%h/.config/restic/%I.env
[Install]
WantedBy=multi-user.target

View file

@ -0,0 +1,9 @@
[Unit]
Description=Run restic prune script for %I utilizing HOME/.config/restic/%I-prune.sh file
[Timer]
OnCalendar=Wed 23:00:00
Persistent=false
[Install]
WantedBy=timers.target