Compare commits

..
Author SHA1 Message Date
MickLesk 2b0c1b22e8 FreshRSS: add missing PHP extensions through setup_php
apt install php-xml php-intl takes Sury's unversioned packages, which now
depend on PHP 8.6: the update put a second PHP in next to the 8.4 Apache runs,
and Apache still had no intl or xml. With the core pin fixed, apt refuses them
outright. setup_php installs php8.4-xml and php8.4-intl as the install does.
2026-11-28 12:40:13 +01:00
2 changed files with 13 additions and 11 deletions

No files matched your search

+1 -5
View File
@@ -38,11 +38,7 @@ function update_script() {
fi
if ! php -r 'exit((extension_loaded("intl") && extension_loaded("xml")) ? 0 : 1);' 2>/dev/null; then
msg_info "Installing missing PHP extensions"
apt_update_safe
$STD apt install -y php-xml php-intl
systemctl reload apache2
msg_ok "Installed missing PHP extensions"
PHP_VERSION="8.4" PHP_APACHE="YES" PHP_MODULE="xml,intl" setup_php
fi
if check_for_gh_release "freshrss" "FreshRSS/FreshRSS"; then
+12 -6
View File
@@ -31,20 +31,26 @@ function update_script() {
fi
setup_mariadb
if [[ "$(php -v 2>/dev/null | awk '/^PHP/{print $2}' | cut -d. -f1,2)" != "8.4" ]]; then
PHP_VERSION="8.4" PHP_APACHE="YES" PHP_FPM="YES" setup_php
fi
CURRENT_PHP=$(php -v 2>/dev/null | awk '/^PHP/{print $2}' | cut -d. -f1,2)
setup_composer
if [[ "$CURRENT_PHP" != "8.4" ]]; then
msg_info "Migrating PHP $CURRENT_PHP to 8.4"
$STD apt remove -y php"${CURRENT_PHP//./}"*
PHP_VERSION="8.4" PHP_APACHE="YES" PHP_FPM="YES" setup_php
msg_ok "Migrated PHP $CURRENT_PHP to 8.4"
fi
if check_for_gh_release "pelican-panel" "pelican-dev/panel"; then
msg_info "Stopping Service"
cd /opt/pelican-panel
$STD php artisan down
msg_ok "Stopped Service"
mkdir -p /opt/backup/storage/app
mkdir -p /opt/backup
cp -a /opt/pelican-panel/.env /opt/backup
[[ -d /opt/pelican-panel/storage/app/public ]] && cp -a /opt/pelican-panel/storage/app/public /opt/backup/storage/app/
mkdir -p /opt/backup/storage/app/
cp -a /opt/pelican-panel/storage/app/public /opt/backup/storage/app/
SQLITE_INSTALL=$(ls /opt/pelican-panel/database/*.sqlite 1>/dev/null 2>&1 && echo "true" || echo "false")
$SQLITE_INSTALL && cp -r /opt/pelican-panel/database/*.sqlite /opt/backup
@@ -57,7 +63,7 @@ function update_script() {
cp -a /opt/backup/.env /opt/pelican-panel/
grep -q "^APP_URL=http://panel.test$" /opt/pelican-panel/.env && sed -i "s|^APP_URL=.*|APP_URL=http://${LOCAL_IP}|" /opt/pelican-panel/.env
$SQLITE_INSTALL && mv /opt/backup/*.sqlite /opt/pelican-panel/database/
[[ -d /opt/backup/storage/app/public ]] && cp -a /opt/backup/storage/app/public /opt/pelican-panel/storage/app/
cp -a /opt/backup/storage/app/public /opt/pelican-panel/storage/app/
$STD composer install --no-dev --optimize-autoloader --no-interaction
PANEL_URL="$(sed -n 's/^APP_URL=//p' /opt/pelican-panel/.env | tr -d "\"'")"