Browse Source

Make php.ng.maps.jinja work for php5 on Debian. Fixed config dir.

tags/v0.34.0
Vitali Quiering 7 years ago
parent
commit
51984f06de
1 changed files with 11 additions and 6 deletions
  1. +11
    -6
      php/ng/map.jinja

+ 11
- 6
php/ng/map.jinja View File

{%- endif %} {%- endif %}
{%- elif salt['grains.get']('os') == "Debian" %} {%- elif salt['grains.get']('os') == "Debian" %}
{%- set phpng_version = salt['pillar.get']('php:ng:version', '7.0')|string %} {%- set phpng_version = salt['pillar.get']('php:ng:version', '7.0')|string %}
{%- if phpng_version|string == '5' %}
{%- set confdir = '/etc/php5' %}
{%- else %}
{%- set confdir = '/etc/php/' + phpng_version %}
{%- endif %}
{%- set php = salt['pillar.get']('php:ng', { {%- set php = salt['pillar.get']('php:ng', {
'lookup': salt['grains.filter_by']({ 'lookup': salt['grains.filter_by']({
'Debian': { 'Debian': {
'zip': 'php' + phpng_version + '-zip', 'zip': 'php' + phpng_version + '-zip',
}, },
'fpm': { 'fpm': {
'conf': '/etc/php/' + phpng_version + '/fpm/php-fpm.conf',
'ini': '/etc/php/' + phpng_version + '/fpm/php.ini',
'pools': '/etc/php/' + phpng_version + '/fpm/pool.d',
'conf': confdir + '/fpm/php-fpm.conf',
'ini': confdir + '/fpm/php.ini',
'pools': confdir + '/fpm/pool.d',
'service': 'php' + phpng_version + '-fpm', 'service': 'php' + phpng_version + '-fpm',
'defaults': odict([ 'defaults': odict([
('global', odict([ ('global', odict([
('pid', '/var/run/php' + phpng_version + '-fpm.pid'), ('pid', '/var/run/php' + phpng_version + '-fpm.pid'),
('error_log', '/var/log/php' + phpng_version + '-fpm.log'), ('error_log', '/var/log/php' + phpng_version + '-fpm.log'),
])), ])),
('include', '/etc/php/' + phpng_version + '/fpm/pool.d/*.conf'),
('include', confdir + '/fpm/pool.d/*.conf'),
]), ]),
}, },
'hhvm': { 'hhvm': {
]), ]),
}, },
'cli': { 'cli': {
'ini': '/etc/php/' + phpng_version + '/cli/php.ini',
'ini': confdir + '/cli/php.ini',
}, },
'apache2': { 'apache2': {
'ini': '/etc/php/' + phpng_version + '/apache2/php.ini',
'ini': confdir + '/apache2/php.ini',
}, },
}, },
}), }),

Loading…
Cancel
Save