From b2cdaa8ab77fd62915bf3cd6d4bfe00c122248b9 Mon Sep 17 00:00:00 2001 From: Bruno Carlin Date: Mon, 20 Feb 2017 16:19:59 +0100 Subject: [PATCH] add systemd services --- systemd/.config/systemd/user/ssh-agent.service | 10 ++++++++++ systemd/.config/systemd/user/syncemail.service | 6 ++++++ systemd/.config/systemd/user/syncemail.timer | 10 ++++++++++ 3 files changed, 26 insertions(+) create mode 100644 systemd/.config/systemd/user/ssh-agent.service create mode 100644 systemd/.config/systemd/user/syncemail.service create mode 100644 systemd/.config/systemd/user/syncemail.timer diff --git a/systemd/.config/systemd/user/ssh-agent.service b/systemd/.config/systemd/user/ssh-agent.service new file mode 100644 index 0000000..87d6c04 --- /dev/null +++ b/systemd/.config/systemd/user/ssh-agent.service @@ -0,0 +1,10 @@ +[Unit] +Description=SSH key agent + +[Service] +Type=forking +Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket +ExecStart=/usr/bin/ssh-agent -a $SSH_AUTH_SOCK + +[Install] +WantedBy=default.target diff --git a/systemd/.config/systemd/user/syncemail.service b/systemd/.config/systemd/user/syncemail.service new file mode 100644 index 0000000..78fe87f --- /dev/null +++ b/systemd/.config/systemd/user/syncemail.service @@ -0,0 +1,6 @@ +[Unit] +Description=Synchronize local cache for IMAP accounts + +[Service] +Type=oneshot +ExecStart=/home/bca/.local/bin/syncemail diff --git a/systemd/.config/systemd/user/syncemail.timer b/systemd/.config/systemd/user/syncemail.timer new file mode 100644 index 0000000..788747e --- /dev/null +++ b/systemd/.config/systemd/user/syncemail.timer @@ -0,0 +1,10 @@ +[Unit] +Description=Mailbox synchronization timer + +[Timer] +OnCalendar=*-*-* *:00/2:00 +Persistent=true +Unit=syncemail.service + +[Install] +WantedBy=timers.target