diff --git a/systemd/copy-keepassxc-db@.service b/systemd/copy-keepassxc-db@.service new file mode 100644 index 0000000..adf5688 --- /dev/null +++ b/systemd/copy-keepassxc-db@.service @@ -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 diff --git a/systemd/copy-keepassxc-db@.timer b/systemd/copy-keepassxc-db@.timer new file mode 100644 index 0000000..0ce1414 --- /dev/null +++ b/systemd/copy-keepassxc-db@.timer @@ -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 diff --git a/systemd/vdirsyncer@.service b/systemd/vdirsyncer@.service new file mode 100644 index 0000000..3732007 --- /dev/null +++ b/systemd/vdirsyncer@.service @@ -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 diff --git a/systemd/vdirsyncer@.timer b/systemd/vdirsyncer@.timer new file mode 100644 index 0000000..d7409ec --- /dev/null +++ b/systemd/vdirsyncer@.timer @@ -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