Lookup php-fpm package in case something goes wrong
This commit is contained in:
parent
cde4cfac80
commit
4289762236
2 changed files with 18 additions and 0 deletions
|
@ -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(){
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue