renew-cert.sh 506 Bytes
Newer Older
Leo Pound Singer's avatar
Leo Pound Singer committed
1 2 3 4 5 6 7 8
#!/bin/sh
# Renew the robot certificate from the Kerberos keytab.
set -e
X509_USER_CERT="$HOME/.globus/usercert.pem"
X509_USER_KEY="$HOME/.globus/userkey.pem"
KERBEROS_KEYTAB="${HOME}/.globus/krb5.keytab"
KERBEROS_PRINCIPAL="$(klist -k "${KERBEROS_KEYTAB}" | tail -n 1 | sed 's/.*\s//')"
kinit "${KERBEROS_PRINCIPAL}" -k -t "${KERBEROS_KEYTAB}"
Leo Pound Singer's avatar
Leo Pound Singer committed
9
ligo-proxy-init -k > /dev/null
10
GRID_PROXY_PATH="$(grid-proxy-info -path)"
Leo Pound Singer's avatar
Leo Pound Singer committed
11 12
cp "${GRID_PROXY_PATH}" "${X509_USER_CERT}"
cp "${GRID_PROXY_PATH}" "${X509_USER_KEY}"