localserver: Install site settings via a symlink to /etc/zulip/settings.py.

(imported from commit b0bedfe3fc4e9039f30061ae9cbdc34069f1f284)
This commit is contained in:
Tim Abbott
2013-11-08 17:13:56 -05:00
parent 92a230acaa
commit 8eaef81f6b
2 changed files with 6 additions and 0 deletions

View File

@@ -29,6 +29,10 @@ if [ -e "/etc/init.d/apache2" ]; then
service apache2 restart
fi
/root/zulip/scripts/setup/generate_localserver_secrets.py
mv /root/zulip/zproject/local_settings_generated.py /etc/zulip/settings.py
ln -nsf /etc/zulip/settings.py /root/zulip/zproject/local_settings.py
deploy_path=$($(dirname $(dirname $0))/unpack-zulip "$tarball")
ln -nsf "$deploy_path" /home/zulip/deployments/current
chown -R zulip:zulip /home/zulip/deployments

View File

@@ -21,6 +21,8 @@ extract_path = tempfile.mkdtemp()
subprocess.check_call(["tar", "-xf", tarball_path, "-C", extract_path])
subprocess.check_call(["mv", os.path.join(extract_path, "zulip-server"), deploy_path])
subprocess.check_call(["rmdir", extract_path])
subprocess.check_call(["ln", "-nsf", "/etc/zulip/settings.py",
os.path.join(deploy_path, "zproject/local_settings.py")])
print deploy_path
sys.exit(0)