[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

@ -5,7 +5,7 @@
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://wordpress.org/
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
@ -15,15 +15,11 @@ update_os
msg_info "Installing Dependencies (Patience)"
$STD apt-get install -y \
curl \
unzip \
sudo \
mc \
apache2 \
php8.2-{bcmath,common,cli,curl,fpm,gd,snmp,imap,mbstring,mysql,xml,zip} \
libapache2-mod-php \
mariadb-server
msg_ok "Installed Dependencies"
apache2 \
php8.2-{bcmath,common,cli,curl,fpm,gd,snmp,imap,mbstring,mysql,xml,zip} \
libapache2-mod-php \
mariadb-server
msg_ok "Installed Dependencies"
msg_info "Setting up Database"
DB_NAME=wordpress_db
@ -37,7 +33,7 @@ $STD mysql -u root -e "GRANT ALL PRIVILEGES ON $DB_NAME.* TO '$DB_USER'@'localho
echo "Database User: $DB_USER"
echo "Database Password: $DB_PASS"
echo "Database Name: $DB_NAME"
} >> ~/wordpress.creds
} >>~/wordpress.creds
msg_ok "Set up Database"
msg_info "Installing Wordpress (Patience)"
@ -50,13 +46,13 @@ find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
mv wp-config-sample.php wp-config.php
sed -i -e "s|^define( 'DB_NAME', '.*' );|define( 'DB_NAME', '$DB_NAME' );|" \
-e "s|^define( 'DB_USER', '.*' );|define( 'DB_USER', '$DB_USER' );|" \
-e "s|^define( 'DB_PASSWORD', '.*' );|define( 'DB_PASSWORD', '$DB_PASS' );|" \
/var/www/html/wordpress/wp-config.php
-e "s|^define( 'DB_USER', '.*' );|define( 'DB_USER', '$DB_USER' );|" \
-e "s|^define( 'DB_PASSWORD', '.*' );|define( 'DB_PASSWORD', '$DB_PASS' );|" \
/var/www/html/wordpress/wp-config.php
msg_ok "Installed Wordpress"
msg_info "Setup Services"
cat <<EOF > /etc/apache2/sites-available/wordpress.conf
cat <<EOF >/etc/apache2/sites-available/wordpress.conf
<VirtualHost *:80>
ServerName yourdomain.com
DocumentRoot /var/www/html/wordpress
@ -82,4 +78,4 @@ msg_info "Cleaning up"
rm -rf /var/www/html/latest.zip
$STD apt-get autoremove
$STD apt-get autoclean
msg_ok "Cleaned"
msg_ok "Cleaned"