Ver código fonte

fix issues with removal of www.conf by executing v-delete-web-php #1477

Jaap Marcus 5 anos atrás
pai
commit
7976a7b6e6
1 arquivos alterados com 9 adições e 0 exclusões
  1. 9 0
      bin/v-delete-web-php

+ 9 - 0
bin/v-delete-web-php

@@ -88,6 +88,15 @@ fi
 # Cleanup php folder
 [[ -d /etc/php/$version ]] && rm -rf "/etc/php/$version"
 
+if [ "$WEB_BACKEND" = "php-fpm" ]; then
+    # Check if www.conf is still missing
+    if [ ! -f "/etc/php/*/fpm/pool.d/www.conf" ]; then
+        # If not grab the "last php version
+        last=$($HESTIA/bin/v-list-sys-php "shell" | tail -n1);
+        cp -f $HESTIA/install/deb/php-fpm/www.conf /etc/php/$last/fpm/pool.d/www.conf
+        $HESTIA/bin/v-restart-web-backend
+    fi
+fi
 
 #----------------------------------------------------------#
 #                       Hestia                             #