From ddcf62b165efaf600cc471dd5cbb699aced862e9 Mon Sep 17 00:00:00 2001 From: Ryan Kavanagh Date: Sat, 24 Jun 2023 10:33:47 -0400 Subject: update systemd timers etc --- dot_config/systemd/user/backup-email.service | 38 ---------------------- dot_config/systemd/user/backup-email.timer | 10 ------ dot_config/systemd/user/backup-email@.service | 34 +++++++++++++++++++ dot_config/systemd/user/backup-irclogs.timer | 10 ------ .../symlink_backup-email@mail.cs.mcgill.ca.service | 1 + .../symlink_backup-email@rak.ac.service | 1 + .../symlink_backup-irclogs.service | 1 + .../symlink_borgmatic@home.timer | 1 + .../symlink_borgmatic@music.timer | 1 + .../symlink_borgmatic@pictures.timer | 1 + .../symlink_borgmatic@tosh.timer | 1 + 11 files changed, 41 insertions(+), 58 deletions(-) delete mode 100644 dot_config/systemd/user/backup-email.service delete mode 100644 dot_config/systemd/user/backup-email.timer create mode 100644 dot_config/systemd/user/backup-email@.service delete mode 100644 dot_config/systemd/user/backup-irclogs.timer create mode 100644 dot_config/systemd/user/borgmatic@tosh.service.wants/symlink_backup-email@mail.cs.mcgill.ca.service create mode 100644 dot_config/systemd/user/borgmatic@tosh.service.wants/symlink_backup-email@rak.ac.service create mode 100644 dot_config/systemd/user/borgmatic@tosh.service.wants/symlink_backup-irclogs.service create mode 100644 dot_config/systemd/user/timers.target.wants/symlink_borgmatic@home.timer create mode 100644 dot_config/systemd/user/timers.target.wants/symlink_borgmatic@music.timer create mode 100644 dot_config/systemd/user/timers.target.wants/symlink_borgmatic@pictures.timer create mode 100644 dot_config/systemd/user/timers.target.wants/symlink_borgmatic@tosh.timer (limited to 'dot_config/systemd') diff --git a/dot_config/systemd/user/backup-email.service b/dot_config/systemd/user/backup-email.service deleted file mode 100644 index 47260f1..0000000 --- a/dot_config/systemd/user/backup-email.service +++ /dev/null @@ -1,38 +0,0 @@ -[Unit] -Description=backup dovecot -Wants=network-online.target -BindsTo=dovecot.service -After=network-online.target -ConditionFileNotEmpty=/media/t/Archives/email/rak.ac/backup.sh -Before=borgmatic@tosh.service - -[Install] -WantedBy=borgmatic@tosh.service - -[Service] -Type=oneshot -LockPersonality=true -MemoryDenyWriteExecute=no -NoNewPrivileges=yes -PrivateTmp=yes -ProtectControlGroups=yes -ProtectHostname=yes -RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 AF_NETLINK -RestrictNamespaces=yes -RestrictRealtime=yes -RestrictSUIDSGID=yes -SystemCallArchitectures=native -SystemCallFilter=@system-service -SystemCallErrorNumber=EPERM -ProtectSystem=full - -Nice=19 -CPUSchedulingPolicy=batch -IOSchedulingClass=best-effort -IOSchedulingPriority=7 -IOWeight=100 - -Restart=no -LogRateLimitIntervalSec=0 - -ExecStart=/media/t/Archives/email/rak.ac/backup.sh diff --git a/dot_config/systemd/user/backup-email.timer b/dot_config/systemd/user/backup-email.timer deleted file mode 100644 index bf49a60..0000000 --- a/dot_config/systemd/user/backup-email.timer +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description=Backup email - -[Timer] -OnCalendar=daily -Persistent=true -RandomizedDelaySec=3h - -[Install] -WantedBy=timers.target diff --git a/dot_config/systemd/user/backup-email@.service b/dot_config/systemd/user/backup-email@.service new file mode 100644 index 0000000..4f9e176 --- /dev/null +++ b/dot_config/systemd/user/backup-email@.service @@ -0,0 +1,34 @@ +[Unit] +Description=backup dovecot +Wants=network-online.target +BindsTo=dovecot.service +After=network-online.target +ConditionFileNotEmpty=/media/t/Archives/email/%I/backup.sh + +[Service] +Type=oneshot +LockPersonality=true +MemoryDenyWriteExecute=no +NoNewPrivileges=yes +PrivateTmp=yes +ProtectControlGroups=yes +ProtectHostname=yes +RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 AF_NETLINK +RestrictNamespaces=yes +RestrictRealtime=yes +RestrictSUIDSGID=yes +SystemCallArchitectures=native +SystemCallFilter=@system-service +SystemCallErrorNumber=EPERM +ProtectSystem=full + +Nice=19 +CPUSchedulingPolicy=batch +IOSchedulingClass=best-effort +IOSchedulingPriority=7 +IOWeight=100 + +Restart=no +LogRateLimitIntervalSec=0 + +ExecStart=/media/t/Archives/email/%I/backup.sh diff --git a/dot_config/systemd/user/backup-irclogs.timer b/dot_config/systemd/user/backup-irclogs.timer deleted file mode 100644 index c074ecb..0000000 --- a/dot_config/systemd/user/backup-irclogs.timer +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description=Backup irc logs - -[Timer] -OnCalendar=weekly -Persistent=true -RandomizedDelaySec=1h - -[Install] -WantedBy=timers.target diff --git a/dot_config/systemd/user/borgmatic@tosh.service.wants/symlink_backup-email@mail.cs.mcgill.ca.service b/dot_config/systemd/user/borgmatic@tosh.service.wants/symlink_backup-email@mail.cs.mcgill.ca.service new file mode 100644 index 0000000..ef74119 --- /dev/null +++ b/dot_config/systemd/user/borgmatic@tosh.service.wants/symlink_backup-email@mail.cs.mcgill.ca.service @@ -0,0 +1 @@ +../backup-email@.service diff --git a/dot_config/systemd/user/borgmatic@tosh.service.wants/symlink_backup-email@rak.ac.service b/dot_config/systemd/user/borgmatic@tosh.service.wants/symlink_backup-email@rak.ac.service new file mode 100644 index 0000000..ef74119 --- /dev/null +++ b/dot_config/systemd/user/borgmatic@tosh.service.wants/symlink_backup-email@rak.ac.service @@ -0,0 +1 @@ +../backup-email@.service diff --git a/dot_config/systemd/user/borgmatic@tosh.service.wants/symlink_backup-irclogs.service b/dot_config/systemd/user/borgmatic@tosh.service.wants/symlink_backup-irclogs.service new file mode 100644 index 0000000..bc2552a --- /dev/null +++ b/dot_config/systemd/user/borgmatic@tosh.service.wants/symlink_backup-irclogs.service @@ -0,0 +1 @@ +../backup-irclogs.service diff --git a/dot_config/systemd/user/timers.target.wants/symlink_borgmatic@home.timer b/dot_config/systemd/user/timers.target.wants/symlink_borgmatic@home.timer new file mode 100644 index 0000000..e2ce4d2 --- /dev/null +++ b/dot_config/systemd/user/timers.target.wants/symlink_borgmatic@home.timer @@ -0,0 +1 @@ +../borgmatic@.timer diff --git a/dot_config/systemd/user/timers.target.wants/symlink_borgmatic@music.timer b/dot_config/systemd/user/timers.target.wants/symlink_borgmatic@music.timer new file mode 100644 index 0000000..e2ce4d2 --- /dev/null +++ b/dot_config/systemd/user/timers.target.wants/symlink_borgmatic@music.timer @@ -0,0 +1 @@ +../borgmatic@.timer diff --git a/dot_config/systemd/user/timers.target.wants/symlink_borgmatic@pictures.timer b/dot_config/systemd/user/timers.target.wants/symlink_borgmatic@pictures.timer new file mode 100644 index 0000000..e2ce4d2 --- /dev/null +++ b/dot_config/systemd/user/timers.target.wants/symlink_borgmatic@pictures.timer @@ -0,0 +1 @@ +../borgmatic@.timer diff --git a/dot_config/systemd/user/timers.target.wants/symlink_borgmatic@tosh.timer b/dot_config/systemd/user/timers.target.wants/symlink_borgmatic@tosh.timer new file mode 100644 index 0000000..e2ce4d2 --- /dev/null +++ b/dot_config/systemd/user/timers.target.wants/symlink_borgmatic@tosh.timer @@ -0,0 +1 @@ +../borgmatic@.timer -- cgit v1.2.3