Upgrade pve-scripts-local to node 24 (#9457)
Co-authored-by: CanbiZ <47820557+MickLesk@users.noreply.github.com> Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com>
This commit is contained in:
parent
5f911164e3
commit
276ce230f3
@ -28,41 +28,8 @@ function update_script() {
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if check_for_gh_release "ProxmoxVE-Local" "community-scripts/ProxmoxVE-Local"; then
|
msg_custom "🚀" "${GN}" "The app offers a built-in updater. Please use it."
|
||||||
msg_info "Stopping Services"
|
|
||||||
systemctl stop pvescriptslocal
|
|
||||||
msg_ok "Stopped Services"
|
|
||||||
|
|
||||||
msg_info "Backup Data"
|
|
||||||
cp /opt/ProxmoxVE-Local/.env /opt/.env.bak
|
|
||||||
cp -r /opt/ProxmoxVE-Local/data /opt/data.bak
|
|
||||||
msg_ok "Backed up Data"
|
|
||||||
|
|
||||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "ProxmoxVE-Local" "community-scripts/ProxmoxVE-Local"
|
|
||||||
|
|
||||||
msg_info "Restoring Data"
|
|
||||||
if [[ -f /opt/.env.bak ]]; then
|
|
||||||
mv /opt/.env.bak /opt/ProxmoxVE-Local/.env
|
|
||||||
fi
|
|
||||||
if [[ -d /opt/data.bak ]]; then
|
|
||||||
rm -rf /opt/ProxmoxVE-Local/data
|
|
||||||
mv /opt/data.bak /opt/ProxmoxVE-Local/data
|
|
||||||
fi
|
|
||||||
msg_ok "Restored Data"
|
|
||||||
|
|
||||||
msg_info "Updating PVE Scripts local"
|
|
||||||
cd /opt/ProxmoxVE-Local
|
|
||||||
chmod 755 data
|
|
||||||
$STD npm install
|
|
||||||
$STD npm run build
|
|
||||||
msg_ok "Updated PVE Scripts local"
|
|
||||||
|
|
||||||
msg_info "Starting Services"
|
|
||||||
systemctl start pvescriptslocal
|
|
||||||
msg_ok "Started Services"
|
|
||||||
msg_ok "Updated successfully!"
|
|
||||||
fi
|
|
||||||
exit
|
|
||||||
}
|
}
|
||||||
|
|
||||||
start
|
start
|
||||||
|
|||||||
@ -20,7 +20,7 @@ $STD apt install -y \
|
|||||||
expect
|
expect
|
||||||
msg_ok "Dependencies installed."
|
msg_ok "Dependencies installed."
|
||||||
|
|
||||||
NODE_VERSION=22 setup_nodejs
|
NODE_VERSION=24 setup_nodejs
|
||||||
fetch_and_deploy_gh_release "ProxmoxVE-Local" "community-scripts/ProxmoxVE-Local"
|
fetch_and_deploy_gh_release "ProxmoxVE-Local" "community-scripts/ProxmoxVE-Local"
|
||||||
|
|
||||||
msg_info "Installing PVE Scripts local"
|
msg_info "Installing PVE Scripts local"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user