Explorar o código

Fix bug in .sh file if condition for multiphp

Raphael Schneeberger %!s(int64=7) %!d(string=hai) anos
pai
achega
68a7c3eb80

+ 2 - 2
install/debian/8/multiphp/apache2/PHP-56.sh

@@ -44,7 +44,7 @@ pool_file_70="/etc/php/7.0/fpm/pool.d/$2.conf"
 pool_file_71="/etc/php/7.1/fpm/pool.d/$2.conf"
 pool_file_72="/etc/php/7.2/fpm/pool.d/$2.conf"
 
-if [ -f "$pool_file_56" ]; then
+if [ ! -f "$pool_file_56" ]; then
     echo "$pool_conf" > $pool_file_56
     service php5.6-fpm restart
 fi
@@ -59,7 +59,7 @@ if [ -f "$pool_file_71" ]; then
     service php7.1-fpm restart
 fi
 
-if [ ! -f "$pool_file_72" ]; then
+if [ -f "$pool_file_72" ]; then
     rm $pool_file_72
     service php7.2-fpm restart
 fi

+ 2 - 2
install/debian/8/multiphp/nginx/PHP-56.sh

@@ -44,7 +44,7 @@ pool_file_70="/etc/php/7.0/fpm/pool.d/$2.conf"
 pool_file_71="/etc/php/7.1/fpm/pool.d/$2.conf"
 pool_file_72="/etc/php/7.2/fpm/pool.d/$2.conf"
 
-if [ -f "$pool_file_56" ]; then
+if [ ! -f "$pool_file_56" ]; then
     echo "$pool_conf" > $pool_file_56
     service php5.6-fpm restart
 fi
@@ -59,7 +59,7 @@ if [ -f "$pool_file_71" ]; then
     service php7.1-fpm restart
 fi
 
-if [ ! -f "$pool_file_72" ]; then
+if [ -f "$pool_file_72" ]; then
     rm $pool_file_72
     service php7.2-fpm restart
 fi

+ 2 - 2
install/debian/8/multiphp/nginx/PHP-70.sh

@@ -49,7 +49,7 @@ if [ -f "$pool_file_56" ]; then
     service php5.6-fpm restart
 fi
 
-if [ -f "$pool_file_70" ]; then
+if [ ! -f "$pool_file_70" ]; then
     echo "$pool_conf" > $pool_file_70
     service php7.0-fpm restart
 fi
@@ -59,7 +59,7 @@ if [ -f "$pool_file_71" ]; then
     service php7.1-fpm restart
 fi
 
-if [ ! -f "$pool_file_72" ]; then
+if [ -f "$pool_file_72" ]; then
     rm $pool_file_72
     service php7.2-fpm restart
 fi

+ 2 - 2
install/debian/8/multiphp/nginx/PHP-71.sh

@@ -54,12 +54,12 @@ if [ -f "$pool_file_70" ]; then
     service php7.0-fpm restart
 fi
 
-if [ -f "$pool_file_71" ]; then
+if [ ! -f "$pool_file_71" ]; then
     echo "$pool_conf" > $pool_file_71
     service php7.1-fpm restart
 fi
 
-if [ ! -f "$pool_file_72" ]; then
+if [ -f "$pool_file_72" ]; then
     rm $pool_file_72
     service php7.2-fpm restart
 fi

+ 2 - 2
install/debian/9/multiphp/apache2/PHP-56.sh

@@ -44,7 +44,7 @@ pool_file_70="/etc/php/7.0/fpm/pool.d/$2.conf"
 pool_file_71="/etc/php/7.1/fpm/pool.d/$2.conf"
 pool_file_72="/etc/php/7.2/fpm/pool.d/$2.conf"
 
-if [ -f "$pool_file_56" ]; then
+if [ ! -f "$pool_file_56" ]; then
     echo "$pool_conf" > $pool_file_56
     service php5.6-fpm restart
 fi
@@ -59,7 +59,7 @@ if [ -f "$pool_file_71" ]; then
     service php7.1-fpm restart
 fi
 
-if [ ! -f "$pool_file_72" ]; then
+if [ -f "$pool_file_72" ]; then
     rm $pool_file_72
     service php7.2-fpm restart
 fi

+ 2 - 2
install/debian/9/multiphp/nginx/PHP-56.sh

@@ -44,7 +44,7 @@ pool_file_70="/etc/php/7.0/fpm/pool.d/$2.conf"
 pool_file_71="/etc/php/7.1/fpm/pool.d/$2.conf"
 pool_file_72="/etc/php/7.2/fpm/pool.d/$2.conf"
 
-if [ -f "$pool_file_56" ]; then
+if [ ! -f "$pool_file_56" ]; then
     echo "$pool_conf" > $pool_file_56
     service php5.6-fpm restart
 fi
@@ -59,7 +59,7 @@ if [ -f "$pool_file_71" ]; then
     service php7.1-fpm restart
 fi
 
-if [ ! -f "$pool_file_72" ]; then
+if [ -f "$pool_file_72" ]; then
     rm $pool_file_72
     service php7.2-fpm restart
 fi

+ 2 - 2
install/debian/9/multiphp/nginx/PHP-70.sh

@@ -49,7 +49,7 @@ if [ -f "$pool_file_56" ]; then
     service php5.6-fpm restart
 fi
 
-if [ -f "$pool_file_70" ]; then
+if [ ! -f "$pool_file_70" ]; then
     echo "$pool_conf" > $pool_file_70
     service php7.0-fpm restart
 fi
@@ -59,7 +59,7 @@ if [ -f "$pool_file_71" ]; then
     service php7.1-fpm restart
 fi
 
-if [ ! -f "$pool_file_72" ]; then
+if [ -f "$pool_file_72" ]; then
     rm $pool_file_72
     service php7.2-fpm restart
 fi

+ 2 - 2
install/debian/9/multiphp/nginx/PHP-71.sh

@@ -54,12 +54,12 @@ if [ -f "$pool_file_70" ]; then
     service php7.0-fpm restart
 fi
 
-if [ -f "$pool_file_71" ]; then
+if [ ! -f "$pool_file_71" ]; then
     echo "$pool_conf" > $pool_file_71
     service php7.1-fpm restart
 fi
 
-if [ ! -f "$pool_file_72" ]; then
+if [ -f "$pool_file_72" ]; then
     rm $pool_file_72
     service php7.2-fpm restart
 fi

+ 2 - 2
install/ubuntu/14.04/multiphp/apache2/PHP-56.sh

@@ -44,7 +44,7 @@ pool_file_70="/etc/php/7.0/fpm/pool.d/$2.conf"
 pool_file_71="/etc/php/7.1/fpm/pool.d/$2.conf"
 pool_file_72="/etc/php/7.2/fpm/pool.d/$2.conf"
 
-if [ -f "$pool_file_56" ]; then
+if [ ! -f "$pool_file_56" ]; then
     echo "$pool_conf" > $pool_file_56
     service php5.6-fpm restart
 fi
@@ -59,7 +59,7 @@ if [ -f "$pool_file_71" ]; then
     service php7.1-fpm restart
 fi
 
-if [ ! -f "$pool_file_72" ]; then
+if [ -f "$pool_file_72" ]; then
     rm $pool_file_72
     service php7.2-fpm restart
 fi

+ 2 - 2
install/ubuntu/14.04/multiphp/nginx/PHP-56.sh

@@ -44,7 +44,7 @@ pool_file_70="/etc/php/7.0/fpm/pool.d/$2.conf"
 pool_file_71="/etc/php/7.1/fpm/pool.d/$2.conf"
 pool_file_72="/etc/php/7.2/fpm/pool.d/$2.conf"
 
-if [ -f "$pool_file_56" ]; then
+if [ ! -f "$pool_file_56" ]; then
     echo "$pool_conf" > $pool_file_56
     service php5.6-fpm restart
 fi
@@ -59,7 +59,7 @@ if [ -f "$pool_file_71" ]; then
     service php7.1-fpm restart
 fi
 
-if [ ! -f "$pool_file_72" ]; then
+if [ -f "$pool_file_72" ]; then
     rm $pool_file_72
     service php7.2-fpm restart
 fi

+ 2 - 2
install/ubuntu/14.04/multiphp/nginx/PHP-70.sh

@@ -49,7 +49,7 @@ if [ -f "$pool_file_56" ]; then
     service php5.6-fpm restart
 fi
 
-if [ -f "$pool_file_70" ]; then
+if [ ! -f "$pool_file_70" ]; then
     echo "$pool_conf" > $pool_file_70
     service php7.0-fpm restart
 fi
@@ -59,7 +59,7 @@ if [ -f "$pool_file_71" ]; then
     service php7.1-fpm restart
 fi
 
-if [ ! -f "$pool_file_72" ]; then
+if [ -f "$pool_file_72" ]; then
     rm $pool_file_72
     service php7.2-fpm restart
 fi

+ 2 - 2
install/ubuntu/14.04/multiphp/nginx/PHP-71.sh

@@ -54,12 +54,12 @@ if [ -f "$pool_file_70" ]; then
     service php7.0-fpm restart
 fi
 
-if [ -f "$pool_file_71" ]; then
+if [ ! -f "$pool_file_71" ]; then
     echo "$pool_conf" > $pool_file_71
     service php7.1-fpm restart
 fi
 
-if [ ! -f "$pool_file_72" ]; then
+if [ -f "$pool_file_72" ]; then
     rm $pool_file_72
     service php7.2-fpm restart
 fi

+ 2 - 2
install/ubuntu/16.04/multiphp/apache2/PHP-56.sh

@@ -44,7 +44,7 @@ pool_file_70="/etc/php/7.0/fpm/pool.d/$2.conf"
 pool_file_71="/etc/php/7.1/fpm/pool.d/$2.conf"
 pool_file_72="/etc/php/7.2/fpm/pool.d/$2.conf"
 
-if [ -f "$pool_file_56" ]; then
+if [ ! -f "$pool_file_56" ]; then
     echo "$pool_conf" > $pool_file_56
     service php5.6-fpm restart
 fi
@@ -59,7 +59,7 @@ if [ -f "$pool_file_71" ]; then
     service php7.1-fpm restart
 fi
 
-if [ ! -f "$pool_file_72" ]; then
+if [ -f "$pool_file_72" ]; then
     rm $pool_file_72
     service php7.2-fpm restart
 fi

+ 2 - 2
install/ubuntu/16.04/multiphp/nginx/PHP-56.sh

@@ -44,7 +44,7 @@ pool_file_70="/etc/php/7.0/fpm/pool.d/$2.conf"
 pool_file_71="/etc/php/7.1/fpm/pool.d/$2.conf"
 pool_file_72="/etc/php/7.2/fpm/pool.d/$2.conf"
 
-if [ -f "$pool_file_56" ]; then
+if [ ! -f "$pool_file_56" ]; then
     echo "$pool_conf" > $pool_file_56
     service php5.6-fpm restart
 fi
@@ -59,7 +59,7 @@ if [ -f "$pool_file_71" ]; then
     service php7.1-fpm restart
 fi
 
-if [ ! -f "$pool_file_72" ]; then
+if [ -f "$pool_file_72" ]; then
     rm $pool_file_72
     service php7.2-fpm restart
 fi

+ 2 - 2
install/ubuntu/16.04/multiphp/nginx/PHP-70.sh

@@ -49,7 +49,7 @@ if [ -f "$pool_file_56" ]; then
     service php5.6-fpm restart
 fi
 
-if [ -f "$pool_file_70" ]; then
+if [ ! -f "$pool_file_70" ]; then
     echo "$pool_conf" > $pool_file_70
     service php7.0-fpm restart
 fi
@@ -59,7 +59,7 @@ if [ -f "$pool_file_71" ]; then
     service php7.1-fpm restart
 fi
 
-if [ ! -f "$pool_file_72" ]; then
+if [ -f "$pool_file_72" ]; then
     rm $pool_file_72
     service php7.2-fpm restart
 fi

+ 2 - 2
install/ubuntu/16.04/multiphp/nginx/PHP-71.sh

@@ -54,12 +54,12 @@ if [ -f "$pool_file_70" ]; then
     service php7.0-fpm restart
 fi
 
-if [ -f "$pool_file_71" ]; then
+if [ ! -f "$pool_file_71" ]; then
     echo "$pool_conf" > $pool_file_71
     service php7.1-fpm restart
 fi
 
-if [ ! -f "$pool_file_72" ]; then
+if [ -f "$pool_file_72" ]; then
     rm $pool_file_72
     service php7.2-fpm restart
 fi

+ 2 - 2
install/ubuntu/18.04/multiphp/apache2/PHP-56.sh

@@ -44,7 +44,7 @@ pool_file_70="/etc/php/7.0/fpm/pool.d/$2.conf"
 pool_file_71="/etc/php/7.1/fpm/pool.d/$2.conf"
 pool_file_72="/etc/php/7.2/fpm/pool.d/$2.conf"
 
-if [ -f "$pool_file_56" ]; then
+if [ ! -f "$pool_file_56" ]; then
     echo "$pool_conf" > $pool_file_56
     service php5.6-fpm restart
 fi
@@ -59,7 +59,7 @@ if [ -f "$pool_file_71" ]; then
     service php7.1-fpm restart
 fi
 
-if [ ! -f "$pool_file_72" ]; then
+if [ -f "$pool_file_72" ]; then
     rm $pool_file_72
     service php7.2-fpm restart
 fi

+ 2 - 2
install/ubuntu/18.04/multiphp/nginx/PHP-56.sh

@@ -44,7 +44,7 @@ pool_file_70="/etc/php/7.0/fpm/pool.d/$2.conf"
 pool_file_71="/etc/php/7.1/fpm/pool.d/$2.conf"
 pool_file_72="/etc/php/7.2/fpm/pool.d/$2.conf"
 
-if [ -f "$pool_file_56" ]; then
+if [ ! -f "$pool_file_56" ]; then
     echo "$pool_conf" > $pool_file_56
     service php5.6-fpm restart
 fi
@@ -59,7 +59,7 @@ if [ -f "$pool_file_71" ]; then
     service php7.1-fpm restart
 fi
 
-if [ ! -f "$pool_file_72" ]; then
+if [ -f "$pool_file_72" ]; then
     rm $pool_file_72
     service php7.2-fpm restart
 fi

+ 2 - 2
install/ubuntu/18.04/multiphp/nginx/PHP-70.sh

@@ -49,7 +49,7 @@ if [ -f "$pool_file_56" ]; then
     service php5.6-fpm restart
 fi
 
-if [ -f "$pool_file_70" ]; then
+if [ ! -f "$pool_file_70" ]; then
     echo "$pool_conf" > $pool_file_70
     service php7.0-fpm restart
 fi
@@ -59,7 +59,7 @@ if [ -f "$pool_file_71" ]; then
     service php7.1-fpm restart
 fi
 
-if [ ! -f "$pool_file_72" ]; then
+if [ -f "$pool_file_72" ]; then
     rm $pool_file_72
     service php7.2-fpm restart
 fi

+ 2 - 2
install/ubuntu/18.04/multiphp/nginx/PHP-71.sh

@@ -54,12 +54,12 @@ if [ -f "$pool_file_70" ]; then
     service php7.0-fpm restart
 fi
 
-if [ -f "$pool_file_71" ]; then
+if [ ! -f "$pool_file_71" ]; then
     echo "$pool_conf" > $pool_file_71
     service php7.1-fpm restart
 fi
 
-if [ ! -f "$pool_file_72" ]; then
+if [ -f "$pool_file_72" ]; then
     rm $pool_file_72
     service php7.2-fpm restart
 fi