diff --git a/mksnap.sh b/mksnap.sh index 8aed89a6346203258204929af330abcc70fb29c5..843427b22ad373e6b7f6b27f9a9c99f7ecaf043c 100755 --- a/mksnap.sh +++ b/mksnap.sh @@ -11,8 +11,8 @@ SNAPSHOTDIR=/hosts/www/www/htdocs/IAM/homepages/claus/download/alberta/snapshots NSNAPSHOTS=10 # keep only the most recent 10 snapshots # Pray that we have a running ssh-agent (and only one ...) -SSH_AGENT_PID=`ps -u claus |grep ssh-agent|awk '{ print $1; }'` -SSH_AUTH_SOCK=`find /tmp -user claus -name "agent.[0-9]*"` +: ${SSH_AGENT_PID=`ps -u claus |grep ssh-agent|awk '{ print $1; }'`} +: ${SSH_AUTH_SOCK=`find /tmp -user claus -name "agent.[0-9]*"`} export SSH_AGENT_PID SSH_AUTH_SOCK if test -z "${SSH_AGENT_PID}" -o -z "${SSH_AUTH_SOCK}"; then