diff --git a/ehcp/ehcpforceupdate.sh b/ehcp/ehcpforceupdate.sh index 838634c..dc55f25 100755 --- a/ehcp/ehcpforceupdate.sh +++ b/ehcp/ehcpforceupdate.sh @@ -1334,8 +1334,18 @@ function CheckPreReqs(){ # Normal aptgetInstall nginx + + # Install PHP-FPM which can be tricky evidently... + installPHPFPM +} + +function installPHPFPM(){ aptgetInstall php5-fpm aptgetInstall php-fpm + phpfpmversionsFromCache=$(apt-cache search "fpm" | grep "php" | grep "\-fpm" | awk '{print $1}') + for version in "$phpfpmversionsFromCache" ; do + aptgetInstall "$version" + done } function addConfDFolder(){ diff --git a/ehcp/install_lib.php b/ehcp/install_lib.php index 33f1af0..d4315b5 100755 --- a/ehcp/install_lib.php +++ b/ehcp/install_lib.php @@ -1237,6 +1237,14 @@ function install_nginx_webserver(){ // Install nginx stuff aptget(array('nginx','php5-fpm','php-fpm','php5-cgi','php-cgi')); # apt-get install nginx php5-fpm php5-cgi + + // Detect php-fpm specific verison in case above fails + $phpFPMVersions = shell_exec("apt-cache search 'fpm' | grep 'php' | grep '\-fpm' | awk '{print \$1}'"); + $arrayOfPHPFPM = array_filter(explode(PHP_EOL, $phpFPMVersions)); + if(isset($arrayOfPHPFPM) && is_array($arrayOfPHPFPM) && count($arrayOfPHPFPM)){ + aptget($arrayOfPHPFPM); + } + copy("$mydir/etc/nginx/mime.types","/etc/nginx/mime.types"); // Stop and disable services