Add apache.get_php_version()
convenience function
This commit is contained in:
parent
4344b2eae0
commit
d2f04b315a
|
@ -51,6 +51,17 @@ def get_version():
|
||||||
return float(match.group(1))
|
return float(match.group(1))
|
||||||
|
|
||||||
|
|
||||||
|
def get_php_version():
|
||||||
|
"""
|
||||||
|
Fetch the version of PHP running on the target system
|
||||||
|
"""
|
||||||
|
result = sudo('php --version')
|
||||||
|
if result.succeeded:
|
||||||
|
match = re.match(r'^PHP (\d+\.\d+)\.\d+-', result)
|
||||||
|
if match:
|
||||||
|
return float(match.group(1))
|
||||||
|
|
||||||
|
|
||||||
def install_wsgi(python_home=None, python3=False):
|
def install_wsgi(python_home=None, python3=False):
|
||||||
"""
|
"""
|
||||||
Install the mod_wsgi Apache module, with optional ``WSGIPythonHome`` value.
|
Install the mod_wsgi Apache module, with optional ``WSGIPythonHome`` value.
|
||||||
|
|
Loading…
Reference in a new issue