Added systemd units
This commit is contained in:
parent
1d7248d342
commit
72fd791e36
7
systemd/copy-keepassxc-db@.service
Normal file
7
systemd/copy-keepassxc-db@.service
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Copy KeePassXC database file to Nextcloud for backup
|
||||||
|
Wants=default.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
ExecStart=/home/zander/scripts/backup-keepassxc-db.sh %i
|
11
systemd/copy-keepassxc-db@.timer
Normal file
11
systemd/copy-keepassxc-db@.timer
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Copy KeePassXC database file to Nextcloud for backup timer
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnCalendar=daily
|
||||||
|
AccuracySec=10m
|
||||||
|
OnStartupSec=5m
|
||||||
|
Persistent=yes
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
9
systemd/vdirsyncer@.service
Normal file
9
systemd/vdirsyncer@.service
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Sync calendar %i with vdirsyncer
|
||||||
|
Wants=default.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
ExecStart=sh -c "echo '%i' | sed 's#:#/#g' | xargs vdirsyncer sync"
|
||||||
|
RuntimeMaxSec=3m
|
||||||
|
Restart=on-failure
|
12
systemd/vdirsyncer@.timer
Normal file
12
systemd/vdirsyncer@.timer
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Sync calendar %i every 5 minutes with vdirsyncer
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnCalendar=*-*-* *:5/10:00
|
||||||
|
FixedRandomDelay=true
|
||||||
|
AccuracySec=30s
|
||||||
|
RandomizedDelaySec=2.5m
|
||||||
|
Persistent=yes
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
Loading…
Reference in New Issue
Block a user