mwolson: Mail delivery works now. Yay!
[hcoop/zz_old/config/exim4-hopper.git] / get-token
index 23c32c0..808820b 100755 (executable)
--- a/get-token
+++ b/get-token
@@ -3,12 +3,24 @@
 #
 # This is used to deliver mail with the appropriate credentials.
 
+touch /tmp/get-token-was-called
+
+exec 2>&1
+exec  >&  /tmp/get-token-log
+
+echo ==============================================================================
+echo invoked: get-token $@
+echo userid:  `who am i`
+
 USER=$1
 export KRB5CCNAME=FILE:/tmp/krb5cc_$USER.email
 kdestroy
 unlog
 
-#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
+KEYTAB=/etc/keytabs/email/$USER.email.keytab
+echo kinit -kt $KEYTAB $USER/mailfilter@HCOOP.NET
+kinit -kt $KEYTAB $USER/mailfilter@HCOOP.NET
+aklog
+tokens
+echo ..............................................................................
+