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
|
||||||
|
|
||||||
|
countOfPHPFPM=$(apt-cache search "fpm" | grep "php" | grep "\-fpm" | awk '{print $1}' | wc -l)
|
||||||
|
if [ "$countOfPHPFPM" -le "2" ]; then
|
||||||
phpfpmversionsFromCache=$(apt-cache search "fpm" | grep "php" | grep "\-fpm" | head -n 2 | awk '{print $1}')
|
phpfpmversionsFromCache=$(apt-cache search "fpm" | grep "php" | grep "\-fpm" | head -n 2 | awk '{print $1}')
|
||||||
for version in "$phpfpmversionsFromCache" ; do
|
for version in "$phpfpmversionsFromCache" ; do
|
||||||
if [ ! -z "$version" ]; then
|
if [ ! -z "$version" ]; then
|
||||||
aptgetInstall "$version"
|
aptgetInstall "$version"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function addConfDFolder(){
|
function addConfDFolder(){
|
||||||
|
|
|
@ -1251,11 +1251,14 @@ 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
|
||||||
|
$numPHPFPMVersions = trim(shell_exec("apt-cache search 'fpm' | grep 'php' | grep '\-fpm' | awk '{print \$1}' | wc -l"));
|
||||||
|
if(!empty($numPHPFPMVersions) && is_numeric($numPHPFPMVersions) && intval($numPHPFPMVersions) <= 2){
|
||||||
$phpFPMVersions = shell_exec("apt-cache search 'fpm' | grep 'php' | grep '\-fpm' | head -n 2 | awk '{print \$1}'");
|
$phpFPMVersions = shell_exec("apt-cache search 'fpm' | grep 'php' | grep '\-fpm' | head -n 2 | awk '{print \$1}'");
|
||||||
$arrayOfPHPFPM = array_filter(explode(PHP_EOL, $phpFPMVersions));
|
$arrayOfPHPFPM = array_filter(explode(PHP_EOL, $phpFPMVersions));
|
||||||
if(isset($arrayOfPHPFPM) && is_array($arrayOfPHPFPM) && count($arrayOfPHPFPM)){
|
if(isset($arrayOfPHPFPM) && is_array($arrayOfPHPFPM) && count($arrayOfPHPFPM)){
|
||||||
aptget($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