diff --git a/bots/zephyr_mirror.py b/bots/zephyr_mirror.py index 79db343..f01cd03 100755 --- a/bots/zephyr_mirror.py +++ b/bots/zephyr_mirror.py @@ -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") diff --git a/bots/zephyr_mirror_backend.py b/bots/zephyr_mirror_backend.py index 8168ae2..f651ab0 100755 --- a/bots/zephyr_mirror_backend.py +++ b/bots/zephyr_mirror_backend.py @@ -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) diff --git a/bots/zmirror-renew-kerberos b/bots/zmirror-renew-kerberos new file mode 100755 index 0000000..3b68808 --- /dev/null +++ b/bots/zmirror-renew-kerberos @@ -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