diff options
| author | EuAndreh <eu@euandre.org> | 2018-11-23 22:19:08 -0200 |
|---|---|---|
| committer | EuAndreh <eu@euandre.org> | 2018-11-23 22:19:08 -0200 |
| commit | cebd9537d0671f6f71371ed1a955f89ec6457c95 (patch) | |
| tree | 2dbaa84a8cda2e617d679b3cc9888a922da94ff7 | |
| parent | Arrange packages by category. (diff) | |
| download | dotfiles-cebd9537d0671f6f71371ed1a955f89ec6457c95.tar.gz dotfiles-cebd9537d0671f6f71371ed1a955f89ec6457c95.tar.xz | |
Fetch mail once an hour.
Adapt mail.sh to be called on-demand.
| -rw-r--r-- | nixos/configuration.nix | 2 | ||||
| -rwxr-xr-x | scripts/mail.sh | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/nixos/configuration.nix b/nixos/configuration.nix index d754f7b..8db07ea 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -298,7 +298,7 @@ services = { cron.enable = true; # We can see the actual generated crontab at /etc/crontab - cron.systemCronJobs = ["* * * * * andreh /home/andreh/annex/dev/code/dotfiles/scripts/mail.sh"]; + cron.systemCronJobs = ["0 * * * * andreh /home/andreh/annex/dev/code/dotfiles/scripts/mail.sh -s"]; xserver = { enable = true; diff --git a/scripts/mail.sh b/scripts/mail.sh index e9f14d8..c8f6522 100755 --- a/scripts/mail.sh +++ b/scripts/mail.sh @@ -1 +1,5 @@ -mbsync -aV &>> /tmp/mbsync.log && notmuch new &>> /tmp/notmuch.log +if [ "$1" = "-s" ]; then + mbsync -a &>> /tmp/mbsync.log && notmuch new &>> /tmp/notmuch.log +else + mbsync -aV && notmuch new +fi |
