aboutsummaryrefslogtreecommitdiff
path: root/dot_config/systemd/user/backup-email@.service
diff options
context:
space:
mode:
Diffstat (limited to 'dot_config/systemd/user/backup-email@.service')
-rw-r--r--dot_config/systemd/user/backup-email@.service34
1 files changed, 34 insertions, 0 deletions
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