zephyr_mirror: Renew kerberos tickets when starting up class mirror.

(imported from commit 34b0a78558c6f20043efe986a16064387f36f1c0)
This commit is contained in:
Tim Abbott 2013-08-20 14:03:07 -04:00
parent ae2b181591
commit a47b0e54c3
3 changed files with 7 additions and 0 deletions

View file

@ -47,6 +47,8 @@ if options.sync_subscriptions:
if options.forward_class_messages and not options.noshard:
sys.path.append("/home/humbug/humbug")
if options.on_startup_command is not None:
subprocess.call([options.on_startup_command])
from zerver.lib.parallel import run_parallel
print "Starting parallel zephyr class mirroring bot"
jobs = list("0123456789abcdef")

View file

@ -890,6 +890,9 @@ def parse_args():
parser.add_option('--site',
default=DEFAULT_SITE,
help=optparse.SUPPRESS_HELP)
parser.add_option('--on-startup-command',
default=None,
help=optparse.SUPPRESS_HELP)
parser.add_option('--user',
default=os.environ["USER"],
help=optparse.SUPPRESS_HELP)

2
bots/zmirror-renew-kerberos Executable file
View file

@ -0,0 +1,2 @@
#!/bin/sh
env KRB5CCNAME=/tmp/krb5cc_1000.tmp kinit -k -t /home/humbug/tabbott.extra.keytab tabbott/extra@ATHENA.MIT.EDU; mv /tmp/krb5cc_1000.tmp /tmp/krb5cc_1000