[Unit] Description=Backup with restic OnFailure=status-email-user@%n.service [Service] Type=simple Nice=10 User=lerentis ExecStart=/usr/local/sbin/restic_backup.sh # $HOME or $XDG_CACHE_HOME must be set for restic to find /root/.cache/restic/ Environment="HOME=/home/lerentis/" Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket