mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-12-25 06:10:20 +00:00
comments
Signed-off-by: Rob Gill <rrobgill@protonmail.com>
This commit is contained in:
parent
6381bdbf33
commit
11f0ade921
1 changed files with 2 additions and 2 deletions
|
@ -166,12 +166,12 @@ if command -v apt-get &> /dev/null; then
|
||||||
echo -e " ${INFO} Existing PHP installation detected : PHP version $phpInsVersion"
|
echo -e " ${INFO} Existing PHP installation detected : PHP version $phpInsVersion"
|
||||||
phpInsMajor="$(echo "$phpInsVersion" | cut -d\. -f1)"
|
phpInsMajor="$(echo "$phpInsVersion" | cut -d\. -f1)"
|
||||||
phpInsMinor="$(echo "$phpInsVersion" | cut -d\. -f2)"
|
phpInsMinor="$(echo "$phpInsVersion" | cut -d\. -f2)"
|
||||||
# Is installed php version newer than php5?
|
# Is installed php version 7.0 or greater
|
||||||
if [ "$(echo "$phpInsMajor.$phpInsMinor < 7.0" | bc )" == 0 ]; then
|
if [ "$(echo "$phpInsMajor.$phpInsMinor < 7.0" | bc )" == 0 ]; then
|
||||||
phpInsNewer=true
|
phpInsNewer=true
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
# Check if installed php is unsupported version (5.4 is EOL)
|
# Check if installed php is v 7.0, or newer to determine packages to install
|
||||||
if [[ "$phpInsNewer" != true ]]; then
|
if [[ "$phpInsNewer" != true ]]; then
|
||||||
# Prefer the php metapackage if it's there
|
# Prefer the php metapackage if it's there
|
||||||
if ${PKG_MANAGER} install --dry-run php > /dev/null 2>&1; then
|
if ${PKG_MANAGER} install --dry-run php > /dev/null 2>&1; then
|
||||||
|
|
Loading…
Reference in a new issue