From 46a74271ea90d999c3b983269a4583fa98c58fdc Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Fri, 4 Oct 2013 13:19:57 -0400 Subject: [PATCH] [manual] Rename /home/humbug to /home/zulip. This may require just doing an mv on the home directory, plus changing the home directory in /etc/passwd. It should of course be done carefully. (imported from commit 660997d897ee6d33563af74f0fc5d4267a911755) --- bots/check-mirroring | 2 +- bots/process_ccache | 8 ++++---- bots/sync-public-streams | 6 +++--- bots/zephyr_mirror.py | 2 +- bots/zephyr_mirror_backend.py | 2 +- bots/zmirror-renew-kerberos | 2 +- bots/zmirror_private.conf.template | 4 ++-- bots/zulip_git_config.py | 2 +- bots/zulip_trac_config.py | 2 +- 9 files changed, 15 insertions(+), 15 deletions(-) diff --git a/bots/check-mirroring b/bots/check-mirroring index 8ee85df..26eec3d 100755 --- a/bots/check-mirroring +++ b/bots/check-mirroring @@ -22,7 +22,7 @@ parser.add_option('--sharded', action='store_true') parser.add_option('--root-path', dest='root_path', - default="/home/humbug", + default="/home/zulip", action='store') (options, args) = parser.parse_args() diff --git a/bots/process_ccache b/bots/process_ccache index 08f8e48..8d404cd 100755 --- a/bots/process_ccache +++ b/bots/process_ccache @@ -10,18 +10,18 @@ ccache_data_encoded = sys.argv[3] # Update the Kerberos ticket cache file program_name = "zmirror-%s" % (short_user,) -with file("/home/humbug/ccache/%s" % (program_name,), "w") as f: +with file("/home/zulip/ccache/%s" % (program_name,), "w") as f: f.write(base64.b64decode(ccache_data_encoded)) # Setup API key -api_key_path = "/home/humbug/api-keys/%s" % (program_name,) +api_key_path = "/home/zulip/api-keys/%s" % (program_name,) file(api_key_path, "w").write(api_key + "\n") # Setup supervisord configuration supervisor_path = "/etc/supervisor/conf.d/%s.conf" % (program_name,) -template = "/home/humbug/zulip/bots/zmirror_private.conf.template" +template = "/home/zulip/zulip/bots/zmirror_private.conf.template" template_data = file(template).read() -session_path = "/home/humbug/zephyr_sessions/%s" % (program_name,) +session_path = "/home/zulip/zephyr_sessions/%s" % (program_name,) # Preserve mail zephyrs forwarding setting across rewriting the config file diff --git a/bots/sync-public-streams b/bots/sync-public-streams index d2ddaf7..ebbbefb 100755 --- a/bots/sync-public-streams +++ b/bots/sync-public-streams @@ -43,7 +43,7 @@ def fetch_public_streams(): return public_streams if __name__ == "__main__": - log_file = "/home/humbug/sync_public_streams.log" + log_file = "/home/zulip/sync_public_streams.log" logger = logging.getLogger(__name__) log_format = "%(asctime)s: %(message)s" logging.basicConfig(format=log_format) @@ -59,9 +59,9 @@ if __name__ == "__main__": if public_streams is None: continue - f = file("/home/humbug/public_streams.tmp", "w") + f = file("/home/zulip/public_streams.tmp", "w") f.write(simplejson.dumps(list(public_streams)) + "\n") f.close() - subprocess.call(["mv", "/home/humbug/public_streams.tmp", "/home/humbug/public_streams"]) + subprocess.call(["mv", "/home/zulip/public_streams.tmp", "/home/zulip/public_streams"]) diff --git a/bots/zephyr_mirror.py b/bots/zephyr_mirror.py index 925be92..a976131 100755 --- a/bots/zephyr_mirror.py +++ b/bots/zephyr_mirror.py @@ -46,7 +46,7 @@ if options.sync_subscriptions: sys.exit(0) if options.forward_class_messages and not options.noshard: - sys.path.append("/home/humbug/zulip") + sys.path.append("/home/zulip/zulip") if options.on_startup_command is not None: subprocess.call([options.on_startup_command]) from zerver.lib.parallel import run_parallel diff --git a/bots/zephyr_mirror_backend.py b/bots/zephyr_mirror_backend.py index 8d71f06..c2c01e5 100755 --- a/bots/zephyr_mirror_backend.py +++ b/bots/zephyr_mirror_backend.py @@ -960,7 +960,7 @@ def parse_args(): help=optparse.SUPPRESS_HELP) parser.add_option('--stream-file-path', dest='stream_file_path', - default="/home/humbug/public_streams", + default="/home/zulip/public_streams", help=optparse.SUPPRESS_HELP) parser.add_option('--no-forward-personals', dest='forward_personals', diff --git a/bots/zmirror-renew-kerberos b/bots/zmirror-renew-kerberos index 3b68808..d8fe998 100755 --- a/bots/zmirror-renew-kerberos +++ b/bots/zmirror-renew-kerberos @@ -1,2 +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 +env KRB5CCNAME=/tmp/krb5cc_1000.tmp kinit -k -t /home/zulip/tabbott.extra.keytab tabbott/extra@ATHENA.MIT.EDU; mv /tmp/krb5cc_1000.tmp /tmp/krb5cc_1000 diff --git a/bots/zmirror_private.conf.template b/bots/zmirror_private.conf.template index 30a49b2..556de90 100644 --- a/bots/zmirror_private.conf.template +++ b/bots/zmirror_private.conf.template @@ -1,5 +1,5 @@ [program:zmirror-USERNAME] -command=python /home/humbug/zulip/bots/zephyr_mirror_backend.py --root-path=/home/humbug/zulip/bots --user=USERNAME --log-path=/home/humbug/logs/mirror-log-%(program_name)s --use-sessions --session-path=/home/humbug/zephyr_sessions/%(program_name)s --api-key-file=/home/humbug/api-keys/%(program_name)s --ignore-expired-tickets --nagios-path=/home/humbug/mirror_status/%(program_name)s --nagios-class=zulip-mirror-nagios +command=python /home/zulip/zulip/bots/zephyr_mirror_backend.py --root-path=/home/zulip/zulip/bots --user=USERNAME --log-path=/home/zulip/logs/mirror-log-%(program_name)s --use-sessions --session-path=/home/zulip/zephyr_sessions/%(program_name)s --api-key-file=/home/zulip/api-keys/%(program_name)s --ignore-expired-tickets --nagios-path=/home/zulip/mirror_status/%(program_name)s --nagios-class=zulip-mirror-nagios priority=200 ; the relative start priority (default 999) autostart=true ; start at supervisord start (default: true) autorestart=true ; whether/when to restart (default: unexpected) @@ -8,4 +8,4 @@ stopwaitsecs=30 ; max num secs to wait b4 SIGKILL (default 10) user=humbug ; setuid to this UNIX account to run the program redirect_stderr=true ; redirect proc stderr to stdout (default false) stdout_logfile=/var/log/zulip/%(program_name)s.log ; stdout log path, NONE for none; default AUTO -environment=HOME="/home/humbug",USER="humbug",KRB5CCNAME="/home/humbug/ccache/%(program_name)s" +environment=HOME="/home/zulip",USER="humbug",KRB5CCNAME="/home/zulip/ccache/%(program_name)s" diff --git a/bots/zulip_git_config.py b/bots/zulip_git_config.py index f3707ee..6ade66d 100644 --- a/bots/zulip_git_config.py +++ b/bots/zulip_git_config.py @@ -30,5 +30,5 @@ def commit_notice_destination(repo, branch, commit): # Return None for cases where you don't want a notice sent return None -ZULIP_API_PATH = "/home/humbug/zulip/api" +ZULIP_API_PATH = "/home/zulip/zulip/api" ZULIP_SITE = "https://staging.zulip.com" diff --git a/bots/zulip_trac_config.py b/bots/zulip_trac_config.py index 4747525..ff7d5e7 100644 --- a/bots/zulip_trac_config.py +++ b/bots/zulip_trac_config.py @@ -10,5 +10,5 @@ STREAM_FOR_NOTIFICATIONS = "trac" TRAC_BASE_TICKET_URL = "https://trac.zulip.net/ticket" TRAC_NOTIFY_FIELDS = ["description", "summary", "resolution", "comment", "owner"] -ZULIP_API_PATH = "/home/humbug/zulip/api" +ZULIP_API_PATH = "/home/zulip/zulip/api" ZULIP_SITE = "https://staging.zulip.com"