File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed
Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change 77
88# upgrade routines goes here
99
10+ # Load hestia.conf
11+ source /usr/local/hestia/conf/hestia.conf
12+
13+ # Set version(s)
14+ pma_v=' 4.8.5'
15+
16+ # Upgrade phpmyadmin
17+ if [ " $DB_SYSTEM " = ' mysql' ]; then
18+ # Display upgrade information
19+ echo " Upgrade phpMyAdmin to v$pma_v ..."
20+
21+ # Download latest phpmyadmin release
22+ wget --quiet https://files.phpmyadmin.net/phpMyAdmin/$pma_v /phpMyAdmin-$pma_v -all-languages.tar.gz
23+
24+ # Unpack files
25+ tar xzf phpMyAdmin-$pma_v -all-languages.tar.gz
26+
27+ # Delete file to prevent error
28+ rm -fr /usr/share/phpmyadmin/doc/html
29+
30+ # Overwrite old files
31+ cp -rf phpMyAdmin-$pma_v -all-languages/* /usr/share/phpmyadmin
32+
33+ # Set config and log directory
34+ sed -i " s|define('CONFIG_DIR', '');|define('CONFIG_DIR', '/etc/phpmyadmin/');|" /usr/share/phpmyadmin/libraries/vendor_config.php
35+ sed -i " s|define('TEMP_DIR', './tmp/');|define('TEMP_DIR', '/var/lib/phpmyadmin/tmp/');|" /usr/share/phpmyadmin/libraries/vendor_config.php
36+
37+ # Create temporary folder and change permission
38+ mkdir /usr/share/phpmyadmin/tmp
39+ chmod 777 /usr/share/phpmyadmin/tmp
40+
41+ # Clear Up
42+ rm -fr phpMyAdmin-$pma_v -all-languages
43+ rm -f phpMyAdmin-$pma_v -all-languages.tar.gz
44+ fi
45+
1046exit 0
You can’t perform that action at this time.
0 commit comments