]> git.friedersdorff.com Git - max/dotfiles.git/blobdiff - offline_mail/.mutt/mutt_with_mbsync.sh
Move mutt launch script to path
[max/dotfiles.git] / offline_mail / .mutt / mutt_with_mbsync.sh
diff --git a/offline_mail/.mutt/mutt_with_mbsync.sh b/offline_mail/.mutt/mutt_with_mbsync.sh
deleted file mode 100755 (executable)
index 83f7d54..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/bash
-
-PID="/home/max/.local/var/run/sync_mailboxes.pid"
-LOG="/home/max/.local/var/log/mutt_mbsync.log"
-touch $LOG
-
-clean_up()
-{
-  kill -TERM $(cat $PID)
-  rm $PID
-
-  sync_mailboxes
-  exit
-}
-
-trap clean_up SIGTERM SIGHUP SIGINT
-
-sync_mailboxes()
-{
-  /usr/bin/mbsync -c /home/max/.mbsync/personal.mbsync -a >> $LOG 2>&1
-  /usr/bin/mbsync -c /home/max/.mbsync/personal-gmail.mbsync -a >> $LOG 2>&1
-  /usr/bin/mbsync -c /home/max/.mbsync/aber.mbsync -a >> $LOG 2>&1
-}
-
-sync_mailboxes_loop()
-{
-  while true
-  do
-    sync_mailboxes
-
-    sleep 60
-  done
-}
-
-sync_mailboxes_loop& >> $LOG 2>&1
-echo $! > $PID
-/usr/bin/mutt
-
-clean_up