[core] Rebase Scripts (formatting, highlighting & remove old deps) (#3378)

* Big Refactor: Remove Deps / Formatting & Correct End Of Line Sequence

* f
This commit is contained in:
CanbiZ
2025-03-24 14:20:56 +01:00
committed by GitHub
parent 316a6716b0
commit 2306531021
290 changed files with 794 additions and 1891 deletions

View File

@ -6,7 +6,7 @@
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://www.mysql.com/products/community | https://www.phpmyadmin.net
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
@ -16,27 +16,24 @@ update_os
msg_info "Installing Dependencies"
$STD apt-get install -y \
sudo \
lsb-release \
curl \
gnupg \
mc
gnupg
msg_ok "Installed Dependencies"
RELEASE_REPO="mysql-8.0"
RELEASE_AUTH="mysql_native_password"
read -r -p "Would you like to install the MySQL 8.4 LTS release instead of MySQL 8.0 (bug fix track; EOL April-2026)? <y/N> " prompt
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
RELEASE_REPO="mysql-8.4-lts"
RELEASE_AUTH="caching_sha2_password"
RELEASE_REPO="mysql-8.4-lts"
RELEASE_AUTH="caching_sha2_password"
fi
msg_info "Installing MySQL"
curl -fsSL https://repo.mysql.com/RPM-GPG-KEY-mysql-2023 | gpg --dearmor -o /usr/share/keyrings/mysql.gpg
curl -fsSL https://repo.mysql.com/RPM-GPG-KEY-mysql-2023 | gpg --dearmor -o /usr/share/keyrings/mysql.gpg
if [ "$(lsb_release -si)" = "Debian" ]; then
echo "deb [signed-by=/usr/share/keyrings/mysql.gpg] http://repo.mysql.com/apt/debian $(lsb_release -sc) ${RELEASE_REPO}" >/etc/apt/sources.list.d/mysql.list
echo "deb [signed-by=/usr/share/keyrings/mysql.gpg] http://repo.mysql.com/apt/debian $(lsb_release -sc) ${RELEASE_REPO}" >/etc/apt/sources.list.d/mysql.list
else
echo "deb [signed-by=/usr/share/keyrings/mysql.gpg] http://repo.mysql.com/apt/ubuntu $(lsb_release -sc) ${RELEASE_REPO}" >/etc/apt/sources.list.d/mysql.list
echo "deb [signed-by=/usr/share/keyrings/mysql.gpg] http://repo.mysql.com/apt/ubuntu $(lsb_release -sc) ${RELEASE_REPO}" >/etc/apt/sources.list.d/mysql.list
fi
$STD apt-get update
export DEBIAN_FRONTEND=noninteractive
@ -64,17 +61,17 @@ if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
php-zip \
php-gd \
php-json \
php-curl
wget -q "https://files.phpmyadmin.net/phpMyAdmin/5.2.1/phpMyAdmin-5.2.1-all-languages.tar.gz"
mkdir -p /var/www/html/phpMyAdmin
tar xf phpMyAdmin-5.2.1-all-languages.tar.gz --strip-components=1 -C /var/www/html/phpMyAdmin
cp /var/www/html/phpMyAdmin/config.sample.inc.php /var/www/html/phpMyAdmin/config.inc.php
SECRET=$(openssl rand -base64 24)
sed -i "s#\$cfg\['blowfish_secret'\] = '';#\$cfg['blowfish_secret'] = '${SECRET}';#" /var/www/html/phpMyAdmin/config.inc.php
chmod 660 /var/www/html/phpMyAdmin/config.inc.php
chown -R www-data:www-data /var/www/html/phpMyAdmin
systemctl restart apache2
php-curl
wget -q "https://files.phpmyadmin.net/phpMyAdmin/5.2.1/phpMyAdmin-5.2.1-all-languages.tar.gz"
mkdir -p /var/www/html/phpMyAdmin
tar xf phpMyAdmin-5.2.1-all-languages.tar.gz --strip-components=1 -C /var/www/html/phpMyAdmin
cp /var/www/html/phpMyAdmin/config.sample.inc.php /var/www/html/phpMyAdmin/config.inc.php
SECRET=$(openssl rand -base64 24)
sed -i "s#\$cfg\['blowfish_secret'\] = '';#\$cfg['blowfish_secret'] = '${SECRET}';#" /var/www/html/phpMyAdmin/config.inc.php
chmod 660 /var/www/html/phpMyAdmin/config.inc.php
chown -R www-data:www-data /var/www/html/phpMyAdmin
systemctl restart apache2
msg_ok "Installed phpMyAdmin"
fi