[manual] Switch over to new /etc/zulip/zulip.conf config file

Run the following commands as root before deploying this branch:
 # /root/zulip/tools/migrate-server-config
 # rm /etc/zulip/machinetype /etc/zulip/server /etc/zulip/local /etc/humbug-machinetype /etc/humbug-server /etc/humbug-local

(imported from commit aa7dcc50d2f4792ce33834f14761e76512fca252)
This commit is contained in:
Zev Benjamin
2013-10-31 19:00:30 -04:00
parent e9bd56b5a0
commit 787215d743
10 changed files with 64 additions and 49 deletions

View File

@@ -15,11 +15,9 @@ logging.basicConfig(format="%(asctime)s restart-server: %(message)s",
deploy_path = os.path.realpath(os.path.join(os.path.dirname(__file__), '..'))
os.chdir(deploy_path)
if os.path.exists("/etc/zulip/server"):
with open("/etc/zulip/machinetype") as mtf:
if pwd.getpwuid(os.getuid())[0] != "zulip":
logging.error("Must be run as user 'zulip'.")
sys.exit(1)
if pwd.getpwuid(os.getuid())[0] != "zulip":
logging.error("Must be run as user 'zulip'.")
sys.exit(1)
# Send a statsd event on restarting the server
subprocess.check_call(["python", "./manage.py", "send_stats", "incr", "events.server_restart", str(int(time.time()))])