2017-10-26 15:59:24 +07:00
|
|
|
def php_default_upstream_socket(php_version):
|
2019-04-26 18:28:04 +07:00
|
|
|
return '/run/php/php%s-fpm.sock' % php_version
|
2017-10-26 15:59:24 +07:00
|
|
|
|
|
|
|
def php_default_upstream_name(php_version):
|
|
|
|
return 'default_php_%s' % php_version
|
|
|
|
|
|
|
|
def php_fpm_service(php_version):
|
2019-04-26 18:28:04 +07:00
|
|
|
return 'php%s-fpm' % php_version
|
2017-10-26 15:59:24 +07:00
|
|
|
|
|
|
|
class FilterModule(object):
|
|
|
|
''' PHP module '''
|
|
|
|
|
|
|
|
def filters(self):
|
|
|
|
return {
|
|
|
|
'php_default_upstream_socket': php_default_upstream_socket,
|
|
|
|
'php_default_upstream_name': php_default_upstream_name,
|
|
|
|
'php_fpm_service': php_fpm_service,
|
|
|
|
'php_fpm_package': php_fpm_service
|
|
|
|
}
|