mirror of https://github.com/zulip/zulip.git
settings.py: Change deployed check
This is security-critical so we have two checks. (imported from commit adaa1cefe2d08526cdaac2fb0d8cc02773390224)
This commit is contained in:
parent
cbdbc12ab0
commit
92b10e3bc2
|
@ -2,7 +2,8 @@
|
||||||
import os
|
import os
|
||||||
import platform
|
import platform
|
||||||
|
|
||||||
deployed = (platform.node() == 'humbug-dev')
|
deployed = (('humbughq.com' in platform.node())
|
||||||
|
or os.path.exists('/etc/humbug-server'))
|
||||||
|
|
||||||
DEBUG = not deployed
|
DEBUG = not deployed
|
||||||
TEMPLATE_DEBUG = DEBUG
|
TEMPLATE_DEBUG = DEBUG
|
||||||
|
|
|
@ -86,6 +86,14 @@ class humbug_base {
|
||||||
source => '/root/humbug/servers/puppet/files/root_authorized_keys',
|
source => '/root/humbug/servers/puppet/files/root_authorized_keys',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# This is just an empty file. It's used by the app to test if it's running
|
||||||
|
# in production.
|
||||||
|
file { '/etc/humbug-server':
|
||||||
|
ensure => file,
|
||||||
|
mode => 644,
|
||||||
|
source => '/root/humbug/servers/puppet/files/humbug-server',
|
||||||
|
}
|
||||||
|
|
||||||
file { '/etc/puppet/puppet.conf':
|
file { '/etc/puppet/puppet.conf':
|
||||||
ensure => file,
|
ensure => file,
|
||||||
mode => 640,
|
mode => 640,
|
||||||
|
|
Loading…
Reference in New Issue