Skip to content

Instantly share code, notes, and snippets.

@badosu
Last active August 29, 2015 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save badosu/07931e271c2c7af2de98 to your computer and use it in GitHub Desktop.
Save badosu/07931e271c2c7af2de98 to your computer and use it in GitHub Desktop.
offlineimap
[Unit]
Description=Sync imap with offlineimap
Requires=network.target
After=network.target
[Service]
Type=simple
User=badosu
Environment=DISPLAY=:0
ExecStart=/usr/bin/offlineimap-notify && sleep 10
ExecStop=killall offlineimap-notify
TimeoutStopSec=5
[Install]
WantedBy=default.target
[Unit]
Description=Runs offlineimap continously
[Timer]
OnBootSec=1m
OnUnitActiveSec=3m
Unit=offlineimap.service
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment