From: Don Armstrong Date: Sun, 18 May 2008 22:48:44 +0000 (+0000) Subject: * use the right ssh_agent_info X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=bdb3cfc09a160803d0cc9a64f9eb11b6dc63b219;p=bin.git * use the right ssh_agent_info --- 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-]+)/;