Skip to content

Commit 317785b

Browse files
committed
Install mysql/pgsql libs when adding a new php backend version
1 parent 41f915b commit 317785b

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

bin/v-add-web-php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,21 @@ fi
5151
mph="php$version-mbstring php$version-bcmath php$version-cli php$version-curl
5252
php$version-fpm php$version-gd php$version-intl php$version-mysql
5353
php$version-soap php$version-xml php$version-zip php$version-mbstring
54-
php$version-json php$version-bz2 php$version-pspell php$version-imagick"
54+
php$version-json php$version-bz2 php$version-pspell php$version-imagick php$version-pgsql"
5555

5656
# Check is version is 7.1 or below to add mcrypt
5757
if [[ `echo "$version 7.2" | awk '{print ($1 < $2)}'` == 1 ]]; then
5858
mph="$mph php$version-mcrypt"
5959
fi
6060

61+
if [ -z "$DB_SYSTEM" -o "$DB_SYSTEM" = "mysql" ]; then
62+
mph=$(echo "$mph" | sed -e "s/php$version-pgsql//")
63+
fi
64+
65+
if [ -z "$DB_SYSTEM" -o "$DB_SYSTEM" = "pgsql" ]; then
66+
mph=$(echo "$mph" | sed -e "s/php$version-mysql//")
67+
fi
68+
6169
# Install php packages
6270
apt-get -qq update
6371
apt-get -y install $mph > /dev/null 2>&1 &

0 commit comments

Comments
 (0)