mwolson: Make progress on email delivery
[hcoop/zz_old/config/exim4-hopper.git] / get-token
index 3000e7d..23c32c0 100755 (executable)
--- a/get-token
+++ b/get-token
@@ -1,8 +1,14 @@
+#!/bin/bash
 # Get an AFS token for the given user.
 #
 # This is used to deliver mail with the appropriate credentials.
 
-KRB5CCNAME=FILE:/tmp/krb5cc_$1.email
+USER=$1
+export KRB5CCNAME=FILE:/tmp/krb5cc_$USER.email
+kdestroy
+unlog
 
-kinit -kt /etc/keytabs/$1.email.keytab
-aklog
+#echo kinit -kt /etc/keytabs/$USER.email.keytab $USER/mailfilter@HCOOP.NET > /tmp/script-log
+kinit -kt /etc/keytabs/$USER.email.keytab $USER/mailfilter@HCOOP.NET
+#aklog
+#tokens