mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-04-21 12:28:06 +00:00
Pelican Panel: Bump php to 8.4 (#3669)
This commit is contained in:
parent
2a24d53b54
commit
8b1cdd1f3f
@ -27,10 +27,27 @@ function update_script() {
|
|||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
CURRENT_PHP=$(php -v 2>/dev/null | awk '/^PHP/{print $2}' | cut -d. -f1,2)
|
||||||
|
|
||||||
|
if [[ "$CURRENT_PHP" != "8.4" ]]; then
|
||||||
|
msg_info "Migrating PHP $CURRENT_PHP to 8.4"
|
||||||
|
$STD curl -fsSLo /tmp/debsuryorg-archive-keyring.deb https://packages.sury.org/debsuryorg-archive-keyring.deb
|
||||||
|
$STD dpkg -i /tmp/debsuryorg-archive-keyring.deb
|
||||||
|
$STD sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
|
||||||
|
$STD apt-get update
|
||||||
|
$STD apt-get remove -y php"${CURRENT_PHP//./}"*
|
||||||
|
$STD apt-get install -y \
|
||||||
|
php8.4 \
|
||||||
|
php8.4-{gd,mysql,mbstring,bcmath,xml,curl,zip,intl,fpm} \
|
||||||
|
libapache2-mod-php8.4
|
||||||
|
|
||||||
|
msg_ok "Migrated PHP $CURRENT_PHP to 8.4"
|
||||||
|
fi
|
||||||
|
|
||||||
RELEASE=$(curl -fsSL https://api.github.com/repos/pelican-dev/panel/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
RELEASE=$(curl -fsSL https://api.github.com/repos/pelican-dev/panel/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||||
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
|
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
|
||||||
msg_info "Stopping Service"
|
msg_info "Stopping Service"
|
||||||
cd /opt/pelican-panel
|
cd /opt/pelican-panel || exit
|
||||||
$STD php artisan down
|
$STD php artisan down
|
||||||
msg_ok "Stopped Service"
|
msg_ok "Stopped Service"
|
||||||
|
|
||||||
|
@ -22,19 +22,19 @@ $STD apt-get install -y \
|
|||||||
composer
|
composer
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
msg_info "Adding PHP8.3 Repository"
|
msg_info "Adding PHP8.4 Repository"
|
||||||
$STD curl -fsSL "https://packages.sury.org/debsuryorg-archive-keyring.deb" -o /tmp/debsuryorg-archive-keyring.deb
|
$STD curl -sSLo "https://packages.sury.org/debsuryorg-archive-keyring.deb" -o /tmp/debsuryorg-archive-keyring.deb
|
||||||
$STD dpkg -i /tmp/debsuryorg-archive-keyring.deb
|
$STD dpkg -i /tmp/debsuryorg-archive-keyring.deb
|
||||||
$STD sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
|
$STD sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
|
||||||
$STD apt-get update
|
$STD apt-get update
|
||||||
msg_ok "Added PHP8.3 Repository"
|
msg_ok "Added PHP8.4 Repository"
|
||||||
|
|
||||||
msg_info "Installing PHP"
|
msg_info "Installing PHP"
|
||||||
$STD apt-get remove -y php8.2*
|
$STD apt-get remove -y php8.2*
|
||||||
$STD apt-get install -y \
|
$STD apt-get install -y \
|
||||||
php8.3 \
|
php8.4 \
|
||||||
php8.3-{gd,mysql,mbstring,bcmath,xml,curl,zip,intl,sqlite3,fpm} \
|
php8.4-{gd,mysql,mbstring,bcmath,xml,curl,zip,intl,sqlite3,fpm} \
|
||||||
libapache2-mod-php8.3
|
libapache2-mod-php8.4
|
||||||
msg_info "Installed PHP"
|
msg_info "Installed PHP"
|
||||||
|
|
||||||
msg_info "Setting up MariaDB"
|
msg_info "Setting up MariaDB"
|
||||||
@ -55,7 +55,7 @@ msg_ok "Set up MariaDB"
|
|||||||
msg_info "Installing Pelican Panel"
|
msg_info "Installing Pelican Panel"
|
||||||
RELEASE=$(curl -fsSL https://api.github.com/repos/pelican-dev/panel/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
RELEASE=$(curl -fsSL https://api.github.com/repos/pelican-dev/panel/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||||
mkdir /opt/pelican-panel
|
mkdir /opt/pelican-panel
|
||||||
cd /opt/pelican-panel
|
cd /opt/pelican-panel || exit
|
||||||
curl -fsSL "https://github.com/pelican-dev/panel/releases/download/v${RELEASE}/panel.tar.gz" -o $(basename "https://github.com/pelican-dev/panel/releases/download/v${RELEASE}/panel.tar.gz")
|
curl -fsSL "https://github.com/pelican-dev/panel/releases/download/v${RELEASE}/panel.tar.gz" -o $(basename "https://github.com/pelican-dev/panel/releases/download/v${RELEASE}/panel.tar.gz")
|
||||||
tar -xzf "panel.tar.gz"
|
tar -xzf "panel.tar.gz"
|
||||||
$STD composer install --no-dev --optimize-autoloader --no-interaction
|
$STD composer install --no-dev --optimize-autoloader --no-interaction
|
||||||
@ -64,7 +64,7 @@ $STD php artisan p:environment:queue-service --no-interaction
|
|||||||
echo "* * * * * php /opt/pelican-panel/artisan schedule:run >> /dev/null 2>&1" | crontab -u www-data -
|
echo "* * * * * php /opt/pelican-panel/artisan schedule:run >> /dev/null 2>&1" | crontab -u www-data -
|
||||||
chown -R www-data:www-data /opt/pelican-panel
|
chown -R www-data:www-data /opt/pelican-panel
|
||||||
chmod -R 755 /opt/pelican-panel/storage /opt/pelican-panel/bootstrap/cache/
|
chmod -R 755 /opt/pelican-panel/storage /opt/pelican-panel/bootstrap/cache/
|
||||||
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
|
echo "${RELEASE}" >/opt/"${APPLICATION}"_version.txt
|
||||||
msg_ok "Installed Pelican Panel"
|
msg_ok "Installed Pelican Panel"
|
||||||
|
|
||||||
msg_info "Creating Service"
|
msg_info "Creating Service"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user