]> git.friedersdorff.com Git - max/dotfiles.git/blobdiff - aber_offline_mail/.local/bin/aber_mutt
Combine various mail modes
[max/dotfiles.git] / aber_offline_mail / .local / bin / aber_mutt
diff --git a/aber_offline_mail/.local/bin/aber_mutt b/aber_offline_mail/.local/bin/aber_mutt
deleted file mode 100755 (executable)
index 0d5ca26..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/bin/bash
-
-
-PASS_FILE="/dev/shm/max_aber_passwd"
-PID="/dev/shm/max_mbsync_loop_pid"
-LOG="/dev/shm/max_mail_log"
-touch $LOG
-
-clean_up()
-{
-  kill -TERM $(cat $PID)
-  rm $PID
-
-  sync_mailboxes
-  rm $PASS_FILE
-  exit
-}
-
-trap clean_up SIGTERM SIGHUP SIGINT
-
-sync_mailboxes()
-{
-  /usr/bin/mbsync -c /home/max/.mbsync.aber -a >> $LOG 2>&1
-}
-
-sync_mailboxes_loop()
-{
-  while true
-  do
-    sync_mailboxes
-
-    sleep 20
-  done
-}
-
-
-rm -f $PASS_FILE
-
-touch $PASS_FILE
-chown max:max $PASS_FILE
-chmod 600 $PASS_FILE
-pass Aber/Main | head -n 1 > $PASS_FILE
-if [[ "${PIPESTATUS[0]}" -ne 0 ]]; then
-  echo "Password not available"
-  exit
-fi
-
-
-sync_mailboxes_loop& >> $LOG 2>&1
-echo $! > $PID
-/usr/bin/mutt -F ~/.mutt/mutt.uk.ac.aber.maf54
-
-clean_up