From ee36f926b1795e85cba1563e071938543733a898 Mon Sep 17 00:00:00 2001 From: Christoph Date: Mon, 14 May 2018 04:00:02 +0200 Subject: [PATCH] install_postfixadmin.sh,install_roundcube.sh: with PHP version 7.0, loaction of socket file has changed. --- install_postfixadmin.sh | 6 +++++- install_roundcube.sh | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/install_postfixadmin.sh b/install_postfixadmin.sh index d95e2a4..f92071e 100755 --- a/install_postfixadmin.sh +++ b/install_postfixadmin.sh @@ -1275,8 +1275,12 @@ EOF EOF if $PHP_DEBIAN_INSTALLATION ; then + php_socket_file="/run/php/php${php_major_version}-fpm.sock" + if [[ -S "/run/php$(echo $php_major_version | cut -d'.' -f1)-fpm.sock" ]]; then + php_socket_file="/run/php$(echo $php_major_version | cut -d'.' -f1)-fpm.sock" + fi cat <> ${APACHE_VHOST_DIR}/${WEBSITE_NAME}.conf 2>> $log_file - SetHandler "proxy:unix:/var/run/php$(echo $php_major_version | cut -d'.' -f1)-fpm.sock|fcgi://127.0.0.1" + SetHandler "proxy:unix:${php_socket_file}|fcgi://127.0.0.1" EOF else cat <> ${APACHE_VHOST_DIR}/${WEBSITE_NAME}.conf 2>> $log_file diff --git a/install_roundcube.sh b/install_roundcube.sh index b880e55..cecaea4 100755 --- a/install_roundcube.sh +++ b/install_roundcube.sh @@ -1272,8 +1272,12 @@ elif [[ "$PHP_TYPE" = "php_fpm" ]]; then EOF if $PHP_DEBIAN_INSTALLATION ; then + php_socket_file="/run/php/php${php_major_version}-fpm.sock" + if [[ -S "/run/php$(echo $php_major_version | cut -d'.' -f1)-fpm.sock" ]]; then + php_socket_file="/run/php$(echo $php_major_version | cut -d'.' -f1)-fpm.sock" + fi cat <> ${APACHE_VHOST_DIR}/${WEBSITE_NAME}.conf 2>> $log_file - SetHandler "proxy:unix:/var/run/php$(echo $php_major_version | cut -d'.' -f1)-fpm.sock|fcgi://127.0.0.1" + SetHandler "proxy:unix:${php_socket_file}|fcgi://127.0.0.1" EOF else cat <> ${APACHE_VHOST_DIR}/${WEBSITE_NAME}.conf 2>> $log_file