Fixup is_apache24 check pre apache2 installation

This commit is contained in:
James Page
2013-09-26 15:20:50 +01:00
parent 9401999560
commit 5d1fa58e5e
2 changed files with 12 additions and 14 deletions

View File

@@ -30,11 +30,9 @@ RELOAD_CHECK = "To activate the new configuration"
def is_apache24():
try:
version = subprocess.check_output(['a2query', '-v'])
if version.startswith('2.4'):
return True
else:
return False
except subprocess.CalledProcessError:
return version.startswith('2.4')
except (subprocess.CalledProcessError, OSError):
# Catch OSError just in case apache2 not yet installed
return False

View File

@@ -49,15 +49,15 @@ delay_auth_decision = {{ delay_auth_decision|lower }}
{% if os_release != 'essex' %}signing_dir = /etc/swift{% endif %}
cache = swift.cache
#[filter:s3token]
#paste.filter_factory = keystoneclient.middleware.s3_token:filter_factory
#service_host = {{ keystone_host }}
#service_port = {{ service_port }}
#auth_port = {{ auth_port }}
#auth_host = {{ keystone_host }}
#auth_protocol = {{ auth_protocol }}
#auth_token = {{ admin_token }}
#admin_token = {{ admin_token }}
[filter:s3token]
paste.filter_factory = keystone.middleware.s3_token:filter_factory
service_host = {{ keystone_host }}
service_port = {{ service_port }}
auth_port = {{ auth_port }}
auth_host = {{ keystone_host }}
auth_protocol = {{ auth_protocol }}
auth_token = {{ admin_token }}
admin_token = {{ admin_token }}
[filter:swift3]
{% if os_release == 'essex' %}use = egg:swift#swift3{% else %}use = egg:swift3#swift3