Browse Source

Create dummy php-fpm configs if missing

Robert Zollner 6 years ago
parent
commit
b993aa609b
1 changed files with 11 additions and 0 deletions
  1. 11 0
      bin/v-rebuild-web-domains

+ 11 - 0
bin/v-rebuild-web-domains

@@ -67,6 +67,17 @@ if [ ! -z "$PROXY_SYSTEM" ]; then
     fi
     fi
 fi
 fi
 
 
+# Create dummy php-fpm configs if missing
+for php_folder in /etc/php/*; do
+    [ ! -d "${php_folder}/fpm/pool.d/" ] && continue
+
+    v_php="$(basename $php_folder)"
+    if [ ! -f "/etc/php/${v_php}/fpm/pool.d/dummy.conf" ]; then
+        cp -f "$HESTIA_INSTALL_DIR/php-fpm/dummy.conf" "/etc/php/${v_php}/fpm/pool.d/"
+        sed -i "s/9999/99${v_php//.}/g" "/etc/php/${v_php}/fpm/pool.d/dummy.conf"
+    fi
+done
+
 # Deleting backend configs
 # Deleting backend configs
 if [ ! -z "$WEB_BACKEND" ]; then
 if [ ! -z "$WEB_BACKEND" ]; then
     if [ "$WEB_BACKEND_POOL" = 'user' ]; then
     if [ "$WEB_BACKEND_POOL" = 'user' ]; then