[systemd: mbsync] Added SystemD mbsync service and timer

This commit is contained in:
Marcel Kapfer 2020-09-16 16:14:25 +02:00
parent a2936f9d9c
commit 1a0e68bb1e
Signed by: mmk2410
GPG key ID: CADE6F0C09F21B09
4 changed files with 25 additions and 0 deletions

View file

@ -10,3 +10,4 @@
.config/redshift
.config/rofi
.config/sxhkd
.confi/systemd/user

View file

@ -25,6 +25,7 @@ shells/fish/conf.d .config/fish/
shells/fish/functions .config/fish/
shells/zshrc .zshrc
stumpwm/stumpwmrc .stumpwmrc
systemd/* .config/systemd/user/
x/Xmodmap .Xmodmap
x/Xresources .Xresources
x/xinitrc .xinitrc

14
systemd/mbsync.service Normal file
View file

@ -0,0 +1,14 @@
[Unit]
Description=mbsync mail synchronisation
Documentation=info:mbsync man:mbsync(1) https://isync.sourceforge.io/
Wants=network-online.target
After=network-online.target
[Service]
Type=oneshot
ExecStart=/usr/bin/mbsync -q -a
ExecStartPost=/usr/bin/emacsclient -equ '(mu4e-update-index)'
Restart=on-failure
[Install]
WantedBy=default.target

9
systemd/mbsync.timer Normal file
View file

@ -0,0 +1,9 @@
[Unit]
Description=Run mbsync and mu index every five minutes
[Timer]
OnBootSec=3min
OnUnitActiveSec=5min
[Install]
WantedBy=timers.target