mirror of
https://github.com/pigmonkey/spark.git
synced 2026-01-23 10:25:39 +00:00
send and receive with mailsync.sh
This commit is contained in:
parent
4a97eaebd1
commit
c4938ea9bd
3 changed files with 5 additions and 6 deletions
|
|
@ -1,11 +1,12 @@
|
|||
#!/bin/sh
|
||||
# Original source: http://bit.ly/1Ztk5wg
|
||||
# Run mbsync when full internet connectivity is available.
|
||||
# Send and receive mail when full internet connectivity is available.
|
||||
|
||||
STATE=`nmcli networking connectivity`
|
||||
|
||||
if [ $STATE = 'full' ]
|
||||
then
|
||||
/usr/local/bin/msmtp-queue -r
|
||||
/usr/bin/mbsync -a
|
||||
exit $?
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -4,11 +4,6 @@
|
|||
tags:
|
||||
- mbsync
|
||||
|
||||
- name: Push mail sync script
|
||||
copy: src=mailsync.sh dest=/usr/local/bin/mailsync mode=755
|
||||
tags:
|
||||
- mbsync
|
||||
|
||||
- name: Push mbsync service file
|
||||
copy: src=mbsync.service dest=/etc/systemd/system/mbsync@.service
|
||||
when: isync
|
||||
|
|
|
|||
|
|
@ -12,6 +12,9 @@
|
|||
- name: Install notmuch
|
||||
pacman: name=notmuch state=present
|
||||
|
||||
- name: Push mail sync script
|
||||
copy: src=mailsync.sh dest=/usr/local/bin/mailsync mode=755
|
||||
|
||||
- include: msmtp.yml
|
||||
- include: isync.yml
|
||||
- include: offlineimap.yml
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue