Преглед изворни кода

Merge pull request #1681 from jaapmarcus/fix/1477-fix-removal-www.conf-by-v-delete-web-php

fix issues with removal of www.conf by executing v-delete-web-php #1477
Kristan Kenney пре 5 година
родитељ
комит
b62699e499
1 измењених фајлова са 9 додато и 0 уклоњено
  1. 9 0
      bin/v-delete-web-php

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

@@ -88,6 +88,15 @@ fi
 # Cleanup php folder
 # Cleanup php folder
 [[ -d /etc/php/$version ]] && rm -rf "/etc/php/$version"
 [[ -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                             #
 #                       Hestia                             #