Minor Fixes
This commit is contained in:
parent
48d45765e2
commit
6ecdd7c083
2 changed files with 17 additions and 10 deletions
|
@ -1396,12 +1396,16 @@ function CheckPreReqs(){
|
||||||
function installPHPFPM(){
|
function installPHPFPM(){
|
||||||
aptgetInstall php5-fpm
|
aptgetInstall php5-fpm
|
||||||
aptgetInstall php-fpm
|
aptgetInstall php-fpm
|
||||||
phpfpmversionsFromCache=$(apt-cache search "fpm" | grep "php" | grep "\-fpm" | head -n 2 | awk '{print $1}')
|
|
||||||
for version in "$phpfpmversionsFromCache" ; do
|
countOfPHPFPM=$(apt-cache search "fpm" | grep "php" | grep "\-fpm" | awk '{print $1}' | wc -l)
|
||||||
if [ ! -z "$version" ]; then
|
if [ "$countOfPHPFPM" -le "2" ]; then
|
||||||
aptgetInstall "$version"
|
phpfpmversionsFromCache=$(apt-cache search "fpm" | grep "php" | grep "\-fpm" | head -n 2 | awk '{print $1}')
|
||||||
fi
|
for version in "$phpfpmversionsFromCache" ; do
|
||||||
done
|
if [ ! -z "$version" ]; then
|
||||||
|
aptgetInstall "$version"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function addConfDFolder(){
|
function addConfDFolder(){
|
||||||
|
|
|
@ -1251,10 +1251,13 @@ function install_nginx_webserver(){
|
||||||
aptget(array('nginx','php5-fpm','php-fpm','php5-cgi','php-cgi')); # apt-get install nginx php5-fpm php5-cgi
|
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
|
// Detect php-fpm specific verison in case above fails
|
||||||
$phpFPMVersions = shell_exec("apt-cache search 'fpm' | grep 'php' | grep '\-fpm' | head -n 2 | awk '{print \$1}'");
|
$numPHPFPMVersions = trim(shell_exec("apt-cache search 'fpm' | grep 'php' | grep '\-fpm' | awk '{print \$1}' | wc -l"));
|
||||||
$arrayOfPHPFPM = array_filter(explode(PHP_EOL, $phpFPMVersions));
|
if(!empty($numPHPFPMVersions) && is_numeric($numPHPFPMVersions) && intval($numPHPFPMVersions) <= 2){
|
||||||
if(isset($arrayOfPHPFPM) && is_array($arrayOfPHPFPM) && count($arrayOfPHPFPM)){
|
$phpFPMVersions = shell_exec("apt-cache search 'fpm' | grep 'php' | grep '\-fpm' | head -n 2 | awk '{print \$1}'");
|
||||||
aptget($arrayOfPHPFPM);
|
$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");
|
copy("$mydir/etc/nginx/mime.types","/etc/nginx/mime.types");
|
||||||
|
|
Loading…
Reference in a new issue