Added systemd units

This commit is contained in:
Alexander Rosenberg 2023-05-25 04:47:11 -07:00
parent 1d7248d342
commit 72fd791e36
Signed by: Zander671
GPG Key ID: 5FD0394ADBD72730
4 changed files with 39 additions and 0 deletions

View 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

View 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

View 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
View 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