fix(pelican-panel): create backup subdirectory before copying storage (#14274)

The update script tried to cp into /opt/backup/storage/app/ before
the directory existed, causing a 'Not a directory' error when
/opt/backup was previously a file or the subdirs were missing.
Add mkdir -p to ensure the target directory exists.

Fixes: #14268
This commit is contained in:
CanbiZ (MickLesk)
2026-05-06 13:10:35 +02:00
committed by GitHub
parent 129e221664
commit 752fff3c8f

View File

@@ -46,6 +46,7 @@ function update_script() {
msg_ok "Stopped Service"
cp -a /opt/pelican-panel/.env /opt/backup
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")