Serghey Rodin 10 лет назад
Родитель
Сommit
56012d8719
3 измененных файлов с 14 добавлено и 10 удалено
  1. 5 4
      install/vst-install-debian.sh
  2. 4 2
      install/vst-install-rhel.sh
  3. 5 4
      install/vst-install-ubuntu.sh

+ 5 - 4
install/vst-install-debian.sh

@@ -105,6 +105,7 @@ set_default_value() {
     fi
 }
 
+
 #----------------------------------------------------------#
 #                    Verifications                         #
 #----------------------------------------------------------#
@@ -853,10 +854,10 @@ ZONE=$(timedatectl 2>/dev/null|grep Timezone|awk '{print $2}')
 if [ -z "$ZONE" ]; then
     ZONE='UTC'
 fi
-sed -i "s/;date.timezone =/date.timezone = $ZONE/g" /etc/php5/apache2/php.ini
-sed -i "s/;date.timezone =/date.timezone = $ZONE/g" /etc/php5/cli/php.ini
-sed -i 's%_open_tag = Off%_open_tag = On%g' /etc/php5/apache2/php.ini
-sed -i 's%_open_tag = Off%_open_tag = On%g' /etc/php5/cli/php.ini
+for pconf in $(find /etc/php* -name php.ini); do
+    sed -i "s/;date.timezone =/date.timezone = $ZONE/g" $pconf
+    sed -i 's%_open_tag = Off%_open_tag = On%g' $pconf
+fi
 
 
 #----------------------------------------------------------#

+ 4 - 2
install/vst-install-rhel.sh

@@ -892,8 +892,10 @@ fi
 if [ -z "$ZONE" ]; then
     ZONE='UTC'
 fi
-sed -i 's%short_open_tag = Off%short_open_tag = On%g' /etc/php.ini
-sed -i "s%;date.timezone =%date.timezone = $ZONE%g" /etc/php.ini
+for pconf in $(find /etc/php* -name php.ini); do
+    sed -i "s/;date.timezone =/date.timezone = $ZONE/g" $pconf
+    sed -i 's%_open_tag = Off%_open_tag = On%g' $pconf
+fi
 
 
 #----------------------------------------------------------#

+ 5 - 4
install/vst-install-ubuntu.sh

@@ -90,6 +90,7 @@ set_default_value() {
     fi
 }
 
+
 #----------------------------------------------------------#
 #                    Verifications                         #
 #----------------------------------------------------------#
@@ -845,10 +846,10 @@ ZONE=$(timedatectl 2>/dev/null|grep Timezone|awk '{print $2}')
 if [ -z "$ZONE" ]; then
     ZONE='UTC'
 fi
-sed -i "s/;date.timezone =/date.timezone = $ZONE/g" /etc/php5/apache2/php.ini
-sed -i "s/;date.timezone =/date.timezone = $ZONE/g" /etc/php5/cli/php.ini
-sed -i 's%_open_tag = Off%_open_tag = On%g' /etc/php5/apache2/php.ini
-sed -i 's%_open_tag = Off%_open_tag = On%g' /etc/php5/cli/php.ini
+for pconf in $(find /etc/php* -name php.ini); do
+    sed -i "s/;date.timezone =/date.timezone = $ZONE/g" $pconf
+    sed -i 's%_open_tag = Off%_open_tag = On%g' $pconf
+fi
 
 
 #----------------------------------------------------------#