Browse Source

Custom PHP repo only if Multi-PHP is selected.

Raphael Schneeberger 7 years ago
parent
commit
73477719c2
2 changed files with 10 additions and 6 deletions
  1. 6 4
      install/hst-install-debian.sh
  2. 4 2
      install/hst-install-ubuntu.sh

+ 6 - 4
install/hst-install-debian.sh

@@ -484,10 +484,12 @@ echo "deb http://nginx.org/packages/debian/ $codename nginx" > $apt/nginx.list
 wget http://nginx.org/keys/nginx_signing.key -O /tmp/nginx_signing.key
 apt-key add /tmp/nginx_signing.key
 
-# Installing sury php repo
-echo "deb https://packages.sury.org/php/ $codename main" > $apt/php.list
-wget https://packages.sury.org/php/apt.gpg -O /tmp/php_signing.key
-apt-key add /tmp/php_signing.key
+if [ "$multiphp" = 'yes' ] || [ "$phpfpm" = 'yes' ]; then
+    # Installing sury php repo
+    echo "deb https://packages.sury.org/php/ $codename main" > $apt/php.list
+    wget https://packages.sury.org/php/apt.gpg -O /tmp/php_signing.key
+    apt-key add /tmp/php_signing.key
+fi
 
 # Installing hestia repo
 echo "deb https://$RHOST/ $codename main" > $apt/hestia.list

+ 4 - 2
install/hst-install-ubuntu.sh

@@ -469,8 +469,10 @@ echo "deb http://nginx.org/packages/mainline/ubuntu/ $codename nginx" \
 wget http://nginx.org/keys/nginx_signing.key -O /tmp/nginx_signing.key
 apt-key add /tmp/nginx_signing.key
 
-# Installing sury php repo
-add-apt-repository -y ppa:ondrej/php > /dev/null 2>&1
+if [ "$multiphp" = 'yes' ] || [ "$phpfpm" = 'yes' ]; then
+    # Installing sury php repo
+    add-apt-repository -y ppa:ondrej/php > /dev/null 2>&1
+fi
 
 # Installing hestia repo
 echo "deb https://$RHOST/ $codename main" > $apt/hestia.list