Skip to content

Commit 28bb693

Browse files
committed
Added phpMyAdmin Updater
1 parent 3eccab6 commit 28bb693

2 files changed

Lines changed: 80 additions & 17 deletions

File tree

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
#!/usr/bin/env bash
2+
#----------------------------------------------------------------------------
3+
# EngineScript - High-Performance WordPress LEMP Server
4+
#----------------------------------------------------------------------------
5+
# Website: https://EngineScript.com
6+
# GitHub: https://github.com/Enginescript/EngineScript
7+
# Company: VisiStruct / EngineScript
8+
# License: GPL v3.0
9+
# OS: Ubuntu 22.04 (jammy)
10+
#----------------------------------------------------------------------------
11+
12+
# EngineScript Variables
13+
source /usr/local/bin/enginescript/enginescript-variables.txt
14+
source /home/EngineScript/enginescript-install-options.txt
15+
16+
# Check current user's ID. If user is not 0 (root), exit.
17+
if [ "${EUID}" != 0 ];
18+
then
19+
echo "${BOLD}ALERT:${NORMAL}"
20+
echo "EngineScript should be executed as the root user."
21+
exit
22+
fi
23+
24+
#----------------------------------------------------------------------------
25+
# Start Main Script
26+
27+
# phpMyAdmin
28+
rm -r /var/www/admin/enginescript/phpmyadmin
29+
wget -O /usr/local/src/phpMyAdmin-${PHPMYADMIN_VER}-all-languages.zip https://files.phpmyadmin.net/phpMyAdmin/${PHPMYADMIN_VER}/phpMyAdmin-${PHPMYADMIN_VER}-all-languages.zip
30+
unzip /usr/local/src/phpMyAdmin-${PHPMYADMIN_VER}-all-languages.zip
31+
mv phpMyAdmin-${PHPMYADMIN_VER}-all-languages phpmyadmin
32+
mv phpmyadmin /var/www/admin/enginescript
33+
sed -e "s|cfg\['blowfish_secret'\] = ''|cfg\['blowfish_secret'\] = '$RAND_CHAR32'|" /var/www/admin/enginescript/phpmyadmin/config.sample.inc.php > /var/www/admin/enginescript/phpmyadmin/config.inc.php
34+
mkdir -p /var/www/admin/enginescript/phpmyadmin/tmp
35+
chown -R www-data:www-data /var/www/admin/enginescript/phpmyadmin
36+
37+
# Post-Install Cleanup
38+
/usr/local/bin/enginescript/scripts/functions/enginescript-cleanup.sh
39+
40+
echo ""
41+
echo ""
42+
echo "============================================================="
43+
echo ""
44+
echo "${BOLD}phpMyAdmin updated to version ${PHPMYADMIN_VER}.${NORMAL}"
45+
echo ""
46+
echo "Point your browser to:"
47+
echo "https://${IP_ADDRESS}/enginescript/phpmyadmin"
48+
echo ""
49+
echo "============================================================="
50+
echo ""
51+
echo ""
52+
53+
sleep 5

scripts/update/software-update.sh

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,32 @@ fi
2727
# Update System Software and Tools
2828

2929
# Update Adminer
30-
/usr/local/bin/enginescript/scripts/install/tools/mysql/adminer.sh
30+
if [ "${INSTALL_ADMINER}" = 1 ];
31+
then
32+
echo "Updating Adminer"
33+
/usr/local/bin/enginescript/scripts/install/tools/mysql/adminer.sh
34+
else
35+
echo "Skipping Adminer update"
36+
fi
3137

3238
# Update libdeflate
3339
/usr/local/bin/enginescript/scripts/install/libdeflate/libdeflate-install.sh
3440

3541
# Update MYSQLTuner
3642
/usr/local/bin/enginescript/scripts/install/tools/mysql/mysqltuner.sh
3743

38-
# Update OpCache-GUI
39-
/usr/local/bin/enginescript/scripts/install/tools/php/opcache-gui.sh
40-
4144
# Update PHP Malware Finder
4245
/usr/local/bin/enginescript/scripts/install/tools/security/php-malware-finder.sh
4346

47+
# Update phpMyAdmin
48+
if [ "${INSTALL_PHYMYADMIN}" = 1 ];
49+
then
50+
echo "Updating phpMyAdmin"
51+
/usr/local/bin/enginescript/scripts/install/tools/security/phpmyadmin-update.sh
52+
else
53+
echo "Skipping phpMyAdmin update"
54+
fi
55+
4456
# Update Python
4557
/usr/local/bin/enginescript/scripts/update/python-update.sh
4658

@@ -60,25 +72,23 @@ gem update wpscan
6072
# Cleanup
6173
/usr/local/bin/enginescript/scripts/functions/enginescript-cleanup.sh
6274

63-
echo ""
6475
echo ""
6576
echo "============================================================="
6677
echo ""
6778
echo "${BOLD}EngineScript has been updated.${NORMAL}"
6879
echo ""
6980
echo "This update includes:"
70-
echo " - Adminer"
71-
echo " - libdeflate"
72-
echo " - MYSQLTuner"
73-
echo " - OpCache-GUI"
74-
echo " - PHP Malware Finder"
75-
echo " - Python Packages"
76-
echo " - WP-CLI"
77-
echo " - WP-CLI Packages"
78-
echo " - WP-Scan"
79-
echo " - zImageOptimizer"
80-
echo " - zlib"
81+
echo " - Adminer (if enabled)"
82+
echo " - libdeflate"
83+
echo " - MYSQLTuner"
84+
echo " - PHP Malware Finder"
85+
echo " - phpMyAdmin (if enabled)"
86+
echo " - Python Packages"
87+
echo " - WP-CLI"
88+
echo " - WP-CLI Packages"
89+
echo " - WP-Scan"
90+
echo " - zImageOptimizer"
91+
echo " - zlib"
8192
echo ""
8293
echo "============================================================="
8394
echo ""
84-
echo ""

0 commit comments

Comments
 (0)