From bdb3cfc09a160803d0cc9a64f9eb11b6dc63b219 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Sun, 18 May 2008 22:48:44 +0000 Subject: [PATCH] * use the right ssh_agent_info --- getmail | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/getmail b/getmail index f38d24c..3eb978f 100755 --- a/getmail +++ b/getmail @@ -12,11 +12,15 @@ if [[ -z "$CRON" && -e ~/.nocheck ]]; then exit 0; fi; +if [ -z "$HOSTNAME" ]; then + HOSTNAME="$(hostname)" +fi; + # See if the server exists if [ -z "$CRON" ] || kill -0 `pgrep -U $(id -u) -x $MUA` 2>/dev/null; then if ping -q -c 3 $IMAPHOST >/dev/null 2>&1; then - if [ -e ~/.ssh/ssh_agent_info ]; then - . ~/.ssh/ssh_agent_info > /dev/null; + if [ -e ~/.ssh/ssh_agent_info_$HOSTNAME ]; then + . ~/.ssh/ssh_agent_info_$HOSTNAME > /dev/null; fi; if nice -n 19 offlineimap -o -u Noninteractive.Basic 2>&1 |grep validity| \ perl -ne 'my ($account,$list) = /UID validity problem for folder ([\w-]+)\.([\w-]+)/; -- 2.39.2