From 7f29a1e519d51934ecf86ddd6fc7d080b2eaaf91 Mon Sep 17 00:00:00 2001 From: Nguyễn Gia Phong Date: Sun, 30 May 2021 14:59:12 +0700 Subject: Set up mbsync --- .../systemd/user/default.target.wants/mbsync-legacy.timer | 1 + .../systemd/user/default.target.wants/mbsync-primary.timer | 1 + debian/.config/systemd/user/ipfs.service | 2 +- debian/.config/systemd/user/mbsync-legacy.service | 12 ++++++++++++ debian/.config/systemd/user/mbsync-legacy.timer | 11 +++++++++++ debian/.config/systemd/user/mbsync-primary.service | 12 ++++++++++++ debian/.config/systemd/user/mbsync-primary.timer | 11 +++++++++++ 7 files changed, 49 insertions(+), 1 deletion(-) create mode 120000 debian/.config/systemd/user/default.target.wants/mbsync-legacy.timer create mode 120000 debian/.config/systemd/user/default.target.wants/mbsync-primary.timer create mode 100644 debian/.config/systemd/user/mbsync-legacy.service create mode 100644 debian/.config/systemd/user/mbsync-legacy.timer create mode 100644 debian/.config/systemd/user/mbsync-primary.service create mode 100644 debian/.config/systemd/user/mbsync-primary.timer (limited to 'debian/.config/systemd') diff --git a/debian/.config/systemd/user/default.target.wants/mbsync-legacy.timer b/debian/.config/systemd/user/default.target.wants/mbsync-legacy.timer new file mode 120000 index 0000000..f24d52e --- /dev/null +++ b/debian/.config/systemd/user/default.target.wants/mbsync-legacy.timer @@ -0,0 +1 @@ +/home/cnx/.config/systemd/user/mbsync-legacy.timer \ No newline at end of file diff --git a/debian/.config/systemd/user/default.target.wants/mbsync-primary.timer b/debian/.config/systemd/user/default.target.wants/mbsync-primary.timer new file mode 120000 index 0000000..2772b5b --- /dev/null +++ b/debian/.config/systemd/user/default.target.wants/mbsync-primary.timer @@ -0,0 +1 @@ +/home/cnx/.config/systemd/user/mbsync-primary.timer \ No newline at end of file diff --git a/debian/.config/systemd/user/ipfs.service b/debian/.config/systemd/user/ipfs.service index 5d67f7e..68b2027 100644 --- a/debian/.config/systemd/user/ipfs.service +++ b/debian/.config/systemd/user/ipfs.service @@ -3,7 +3,7 @@ Description=IPFS daemon After=network.target [Service] -ExecStart=/home/cnx/.local/share/go/bin/ipfs daemon --mount +ExecStart=%h/.local/share/go/bin/ipfs daemon Restart=on-failure [Install] diff --git a/debian/.config/systemd/user/mbsync-legacy.service b/debian/.config/systemd/user/mbsync-legacy.service new file mode 100644 index 0000000..e0954de --- /dev/null +++ b/debian/.config/systemd/user/mbsync-legacy.service @@ -0,0 +1,12 @@ +[Unit] +Description=Synchronize IMAP and MailDir for legacy account +Documentation=man:mbsync(1) +ConditionPathExists=%h/.mbsyncrc +After=network.target + +[Service] +ExecStart=/usr/bin/mbsync legacy +Type=oneshot + +[Install] +WantedBy=default.target diff --git a/debian/.config/systemd/user/mbsync-legacy.timer b/debian/.config/systemd/user/mbsync-legacy.timer new file mode 100644 index 0000000..3ea535a --- /dev/null +++ b/debian/.config/systemd/user/mbsync-legacy.timer @@ -0,0 +1,11 @@ +[Unit] +Description=Timer for legacy accound mbsync +ConditionPathExists=%h/.mbsyncrc +After=network.target + +[Timer] +OnBootSec=1m +OnUnitInactiveSec=1m + +[Install] +WantedBy=default.target diff --git a/debian/.config/systemd/user/mbsync-primary.service b/debian/.config/systemd/user/mbsync-primary.service new file mode 100644 index 0000000..8ce0e6f --- /dev/null +++ b/debian/.config/systemd/user/mbsync-primary.service @@ -0,0 +1,12 @@ +[Unit] +Description=Synchronize IMAP and MailDir for primary account +Documentation=man:mbsync(1) +ConditionPathExists=%h/.mbsyncrc +After=network.target + +[Service] +ExecStart=/usr/bin/mbsync primary +Type=oneshot + +[Install] +WantedBy=default.target diff --git a/debian/.config/systemd/user/mbsync-primary.timer b/debian/.config/systemd/user/mbsync-primary.timer new file mode 100644 index 0000000..a0f4151 --- /dev/null +++ b/debian/.config/systemd/user/mbsync-primary.timer @@ -0,0 +1,11 @@ +[Unit] +Description=Timer for primary accound mbsync +ConditionPathExists=%h/.mbsyncrc +After=network.target + +[Timer] +OnBootSec=1m +OnUnitInactiveSec=1m + +[Install] +WantedBy=default.target -- cgit 1.4.1