diff --git a/scripts/restart-server b/scripts/restart-server index 62024d9fdb..70851d572a 100755 --- a/scripts/restart-server +++ b/scripts/restart-server @@ -15,8 +15,8 @@ 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/humbug-server"): - with open("/etc/humbug-machinetype") as mtf: +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) diff --git a/servers/puppet/modules/zulip/files/humbug-server b/servers/puppet/modules/zulip/files/humbug-server deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/servers/puppet/modules/zulip/files/postgresql/env-wal-e b/servers/puppet/modules/zulip/files/postgresql/env-wal-e index 9c05b90ce3..03e5a35a59 100755 --- a/servers/puppet/modules/zulip/files/postgresql/env-wal-e +++ b/servers/puppet/modules/zulip/files/postgresql/env-wal-e @@ -1,9 +1,9 @@ #!/bin/sh export AWS_ACCESS_KEY_ID=xxxxxxxxxxxxxxxxxxxx export AWS_SECRET_ACCESS_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -if grep -q postgres /etc/humbug-machinetype; then +if grep -q postgres /etc/zulip/machinetype; then export WALE_S3_PREFIX=s3://humbug-postgres-backups else - export WALE_S3_PREFIX=s3://humbug-postgres-`cat /etc/humbug-machinetype`-backups + export WALE_S3_PREFIX=s3://humbug-postgres-`cat /etc/zulip/machinetype`-backups fi exec /usr/local/bin/wal-e "$@" diff --git a/servers/puppet/modules/zulip/manifests/base.pp b/servers/puppet/modules/zulip/manifests/base.pp index 9271a46e56..b574ef5e41 100644 --- a/servers/puppet/modules/zulip/manifests/base.pp +++ b/servers/puppet/modules/zulip/manifests/base.pp @@ -56,10 +56,17 @@ class zulip::base { # This is just an empty file. It's used by the app to test if it's running # in production. - file { '/etc/humbug-server': + file { '/etc/zulip/server': ensure => file, mode => 644, - source => 'puppet:///modules/zulip/humbug-server', + content => '', + } + + file { '/etc/zulip': + ensure => 'directory', + mode => 644, + owner => 'zulip', + group => 'zulip', } file { '/etc/puppet/puppet.conf': diff --git a/servers/puppet/modules/zulip/manifests/init.pp b/servers/puppet/modules/zulip/manifests/init.pp index 68d6a6b39f..b5426467b4 100644 --- a/servers/puppet/modules/zulip/manifests/init.pp +++ b/servers/puppet/modules/zulip/manifests/init.pp @@ -1,7 +1,7 @@ class zulip ($machinetype) { class { "zulip::$machinetype": } - file { '/etc/humbug-machinetype': + file { '/etc/zulip/machinetype': ensure => file, mode => 644, content => "$machinetype\n", diff --git a/servers/puppet/modules/zulip/manifests/local_server.pp b/servers/puppet/modules/zulip/manifests/local_server.pp index d601c97d27..5021514a85 100644 --- a/servers/puppet/modules/zulip/manifests/local_server.pp +++ b/servers/puppet/modules/zulip/manifests/local_server.pp @@ -36,10 +36,10 @@ class zulip::local_server { # This is just an empty file. It's used by the app to test if it's running # on a local server. - file { '/etc/zulip-local': + file { '/etc/zulip/local': ensure => file, mode => 644, - source => 'puppet:///modules/zulip/humbug-server', + content => '', } file { "/usr/share/postgresql/9.1/tsearch_data/zulip_english.stop": diff --git a/zproject/local_settings.py b/zproject/local_settings.py index 8c690ea5e0..025b74116a 100644 --- a/zproject/local_settings.py +++ b/zproject/local_settings.py @@ -47,7 +47,7 @@ EMAIL_PORT = 587 # Whether we're running in a production environment. Note that DEPLOYED does # **not** mean hosted by us; customer sites are DEPLOYED and LOCAL_SERVER # and as such should not for example assume they are the main Zulip site. -DEPLOYED = os.path.exists('/etc/humbug-server') +DEPLOYED = os.path.exists('/etc/zulip/server') STAGING_DEPLOYED = (platform.node() == 'staging.zulip.net') TESTING_DEPLOYED = not not re.match(r'^test', platform.node()) diff --git a/zproject/settings.py b/zproject/settings.py index 61d28b0bd4..b2cde6e223 100644 --- a/zproject/settings.py +++ b/zproject/settings.py @@ -13,7 +13,7 @@ from zerver.openid import openid_failure_handler # Whether we're running in a production environment. Note that DEPLOYED does # **not** mean hosted by us; customer sites are DEPLOYED and LOCAL_SERVER # and as such should not for example assume they are the main Zulip site. -DEPLOYED = os.path.exists('/etc/humbug-server') +DEPLOYED = os.path.exists('/etc/zulip/server') STAGING_DEPLOYED = (platform.node() == 'staging.zulip.net') TESTING_DEPLOYED = not not re.match(r'^test', platform.node())