Also provide restic scripts as systemd global service
This commit is contained in:
parent
1d1aee1c6a
commit
458d48291f
8 changed files with 84 additions and 0 deletions
9
etc/pacman.d/hooks/100-systemd-boot.hook
Normal file
9
etc/pacman.d/hooks/100-systemd-boot.hook
Normal 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
|
16
etc/systemd/system/restic-check@.service
Normal file
16
etc/systemd/system/restic-check@.service
Normal 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
|
9
etc/systemd/system/restic-check@.timer
Normal file
9
etc/systemd/system/restic-check@.timer
Normal 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
|
16
etc/systemd/system/restic-create@.service
Normal file
16
etc/systemd/system/restic-create@.service
Normal 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
|
9
etc/systemd/system/restic-create@.timer
Normal file
9
etc/systemd/system/restic-create@.timer
Normal 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
|
16
etc/systemd/system/restic-prune@.service
Normal file
16
etc/systemd/system/restic-prune@.service
Normal 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
|
9
etc/systemd/system/restic-prune@.timer
Normal file
9
etc/systemd/system/restic-prune@.timer
Normal 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
|
Loading…
Reference in a new issue