Browse Source

Implement phpmyadmin update function to get the latest version.

Raphael Schneeberger 7 years ago
parent
commit
5f0798a850
2 changed files with 54 additions and 0 deletions
  1. 27 0
      install/hst-install-debian.sh
  2. 27 0
      install/hst-install-ubuntu.sh

+ 27 - 0
install/hst-install-debian.sh

@@ -17,6 +17,7 @@ os='debian'
 release=$(cat /etc/debian_version|grep -o [0-9]|head -n1)
 codename="$(cat /etc/os-release |grep VERSION= |cut -f 2 -d \(|cut -f 1 -d \))"
 hestiacp="$HESTIA/install/$VERSION/$release"
+pma_v='4.8.3'
 
 if [ "$release" -eq 9 ]; then
     software="nginx apache2 apache2-utils apache2-suexec-custom
@@ -1089,6 +1090,32 @@ if [ "$mysql" = 'yes' ]; then
     chmod 777 /var/lib/phpmyadmin/tmp
 fi
 
+
+#----------------------------------------------------------#
+#                    Update phpMyAdmin                     #
+#----------------------------------------------------------#
+
+# Download latest phpmyadmin release
+wget https://files.phpmyadmin.net/phpMyAdmin/$pma_v/phpMyAdmin-$pma_v-all-languages.tar.gz
+
+# Unpack files
+tar xzf phpMyAdmin-$pma_v-all-languages.tar.gz
+
+# Delete file to prevent error
+if [ "$pma_#----------------------------------------------------------#
+#                    Update phpMyAdmin                     #
+v" = '4.8.3' ]; then
+    rm -fr /usr/share/phpmyadmin/doc/html
+fi
+
+# Overwrite old files
+cp -rf phpMyAdmin-$pma_v-all-languages/* /usr/share/phpmyadmin
+
+# Clear Up
+rm -fr phpMyAdmin-$pma_v-all-languages
+rm -f phpMyAdmin-$pma_v-all-languages.tar.gz
+
+
 #----------------------------------------------------------#
 #                   Configure PostgreSQL                   #
 #----------------------------------------------------------#

+ 27 - 0
install/hst-install-ubuntu.sh

@@ -17,6 +17,7 @@ os='ubuntu'
 release="$(lsb_release -s -r)"
 codename="$(lsb_release -s -c)"
 hestiacp="$HESTIA/install/$VERSION/$release"
+pma_v='4.8.3'
 
 # Defining software pack for all distros
 software="apache2 apache2.2-common apache2-suexec-custom apache2-utils
@@ -1089,6 +1090,32 @@ if [ "$mysql" = 'yes' ]; then
     chmod 777 /var/lib/phpmyadmin/tmp
 fi
 
+
+#----------------------------------------------------------#
+#                    Update phpMyAdmin                     #
+#----------------------------------------------------------#
+
+# Download latest phpmyadmin release
+wget https://files.phpmyadmin.net/phpMyAdmin/$pma_v/phpMyAdmin-$pma_v-all-languages.tar.gz
+
+# Unpack files
+tar xzf phpMyAdmin-$pma_v-all-languages.tar.gz
+
+# Delete file to prevent error
+if [ "$pma_#----------------------------------------------------------#
+#                    Update phpMyAdmin                     #
+v" = '4.8.3' ]; then
+    rm -fr /usr/share/phpmyadmin/doc/html
+fi
+
+# Overwrite old files
+cp -rf phpMyAdmin-$pma_v-all-languages/* /usr/share/phpmyadmin
+
+# Clear Up
+rm -fr phpMyAdmin-$pma_v-all-languages
+rm -f phpMyAdmin-$pma_v-all-languages.tar.gz
+
+
 #----------------------------------------------------------#
 #                   Configure PostgreSQL                   #
 #----------------------------------------------------------#