diff --git a/CHANGELOG.md b/CHANGELOG.md index f55cf0cd..b84e4efe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * Explicit permissions for systemd overrides * evolinux-base: option to bypass raid-related tasks +* generate-ldif: Add support for php-fpm in containers * kvm-host: add missing default value * openvpn: now check that openvpn has been restarted since last certificates renewal * lxc-php: preliminary support for PHP 8.1 container diff --git a/generate-ldif/templates/generateldif.sh.j2 b/generate-ldif/templates/generateldif.sh.j2 index aa3ec7dd..3b2a6fd2 100755 --- a/generate-ldif/templates/generateldif.sh.j2 +++ b/generate-ldif/templates/generateldif.sh.j2 @@ -602,6 +602,96 @@ ServiceVersion: PostgreSQL ${postgresql_version} EOT fi +# LXC (multiphp) +if is_pkg_installed lxc; then + +if lxc-ls | grep -q php56 ; then + cat <> "${ldif_file}" + +dn: ServiceName=ServiceName=php-fpm56,${computer_dn} +NagiosEnabled: TRUE +ipServiceProtocol: tcp +objectClass: EvoService +ServiceName: PHP-FPM (multiphp) +ipServicePort: 443 +ServiceType: web +ServiceVersion: PHP-FPM 5.6 (multiphp) +EOT +fi + +if lxc-ls | grep -q php70 ; then + cat <> "${ldif_file}" + +dn: ServiceName=ServiceName=php-fpm70,${computer_dn} +NagiosEnabled: TRUE +ipServiceProtocol: tcp +objectClass: EvoService +ServiceName: PHP-FPM (multiphp) +ipServicePort: 443 +ServiceType: web +ServiceVersion: PHP-FPM 7.0 (multiphp) +EOT +fi + +if lxc-ls | grep -q php73 ; then + cat <> "${ldif_file}" + +dn: ServiceName=ServiceName=php-fpm73,${computer_dn} +NagiosEnabled: TRUE +ipServiceProtocol: tcp +objectClass: EvoService +ServiceName: PHP-FPM (multiphp) +ipServicePort: 443 +ServiceType: web +ServiceVersion: PHP-FPM 7.3 (multiphp) +EOT +fi + +if lxc-ls | grep -q php74 ; then + cat <> "${ldif_file}" + +dn: ServiceName=ServiceName=php-fpm74,${computer_dn} +NagiosEnabled: TRUE +ipServiceProtocol: tcp +objectClass: EvoService +ServiceName: PHP-FPM (multiphp) +ipServicePort: 443 +ServiceType: web +ServiceVersion: PHP-FPM 7.4 (multiphp) +EOT +fi + +if lxc-ls | grep -q php80 ; then + cat <> "${ldif_file}" + +dn: ServiceName=ServiceName=php-fpm80,${computer_dn} +NagiosEnabled: TRUE +ipServiceProtocol: tcp +objectClass: EvoService +ServiceName: PHP-FPM (multiphp) +ipServicePort: 443 +ServiceType: web +ServiceVersion: PHP-FPM 8.0 (multiphp) +EOT +fi + +if lxc-ls | grep -q php81 ; then + cat <> "${ldif_file}" + +dn: ServiceName=ServiceName=php-fpm81,${computer_dn} +NagiosEnabled: TRUE +ipServiceProtocol: tcp +objectClass: EvoService +ServiceName: PHP-FPM (multiphp) +ipServicePort: 443 +ServiceType: web +ServiceVersion: PHP-FPM 8.1 (multiphp) +EOT +fi + +fi +# END - LXC (multiphp) + # mdadm if is_pkg_installed mdadm; then mdadm_version=$(get_pkg_version mdadm)