Compare commits

..

3 Commits

Author SHA1 Message Date
Michel Roegl-Brunner 1e43dfaa04 fix(lychee): preserve uploads and ownership during update
The update script wiped public/uploads and did not re-apply www-data
ownership, causing HTTP 500 after successful updates. Align with upstream
upgrade steps and sibling Laravel scripts by backing up uploads/dist,
restarting PHP-FPM, running full artisan cache cycle, and adding verbose
diagnostics.

Fixes #15763
2026-07-14 12:14:17 +02:00
community-scripts-pr-app[bot] 09ec7b3203 Update CHANGELOG.md (#15765)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-07-14 10:02:33 +00:00
Michel Roegl-Brunner 55ab97a020 Revert "fix(fileflows): handle update API failures and fix Node install (#14858)" (#15764)
This reverts commit 171b954c7c.
2026-07-14 12:02:10 +02:00
2 changed files with 20 additions and 13 deletions
+2
View File
@@ -506,6 +506,8 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
### 🚀 Updated Scripts
- Revert "fix(fileflows): handle update API 401, force update, and Node install" [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#15764](https://github.com/community-scripts/ProxmoxVE/pull/15764))
- #### 🐞 Bug Fixes
- fix(fileflows): handle update API 401, force update, and Node install [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#14858](https://github.com/community-scripts/ProxmoxVE/pull/14858))
+18 -13
View File
@@ -31,33 +31,38 @@ function update_script() {
fi
if check_for_gh_release "lychee" "LycheeOrg/Lychee"; then
PHP_VER=$(php -r 'echo PHP_MAJOR_VERSION . "." . PHP_MINOR_VERSION;')
msg_info "Stopping Services"
systemctl stop caddy
systemctl stop caddy php${PHP_VER}-fpm
msg_ok "Stopped Services"
msg_info "Backing up Data"
cp /opt/lychee/.env /opt/lychee.env.bak
cp -r /opt/lychee/storage /opt/lychee_storage_backup
msg_ok "Backed up Data"
create_backup /opt/lychee/.env \
/opt/lychee/storage \
/opt/lychee/public/uploads \
/opt/lychee/public/dist
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "lychee" "LycheeOrg/Lychee" "prebuild" "latest" "/opt/lychee" "Lychee.zip"
msg_info "Restoring Data"
cp /opt/lychee.env.bak /opt/lychee/.env
rm -f /opt/lychee.env.bak
cp -r /opt/lychee_storage_backup/. /opt/lychee/storage
rm -rf /opt/lychee_storage_backup
msg_ok "Restored Data"
restore_backup
msg_info "Updating Application"
cd /opt/lychee
$STD php artisan migrate --force
$STD php artisan config:clear
$STD php artisan cache:clear
$STD php artisan optimize:clear
chmod -R 775 /opt/lychee/storage /opt/lychee/bootstrap/cache
$STD php artisan optimize
chown -R www-data:www-data /opt/lychee
chmod -R 775 /opt/lychee/storage /opt/lychee/bootstrap/cache \
/opt/lychee/public/dist /opt/lychee/public/uploads
if [[ "${VERBOSE:-no}" = "yes" ]]; then
php artisan lychee:diagnostics || true
fi
msg_ok "Updated Application"
msg_info "Starting Services"
systemctl start caddy
systemctl start caddy php${PHP_VER}-fpm
msg_ok "Started Services"
msg_ok "Updated successfully!"
fi