myspeed: fix update process if no data exist (#6795)

This commit is contained in:
CanbiZ 2025-08-13 15:11:41 +02:00 committed by GitHub
parent 79f3662636
commit f1cdef1f9b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -44,7 +44,10 @@ function update_script() {
msg_info "Updating ${APP} to ${RELEASE}"
cd /opt/myspeed
$STD npm install
cp -r /opt/myspeed_bak/data/* /opt/myspeed/data/
if [[ -d /opt/myspeed_bak/data ]]; then
mkdir -p /opt/myspeed/data/
cp -r /opt/myspeed_bak/data/* /opt/myspeed/data/
fi
msg_ok "Updated ${APP} to ${RELEASE}"
msg_info "Starting ${APP} Service"