Skip to content

Commit 563a69e

Browse files
authored
pve-scripts-local: add update function (#8138)
1 parent 7ab2bcb commit 563a69e

File tree

3 files changed

+39
-6
lines changed

3 files changed

+39
-6
lines changed

ct/pve-scripts-local.sh

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,45 @@ function update_script() {
2323
header_info
2424
check_container_storage
2525
check_container_resources
26-
if [[ ! -d /var ]]; then
26+
if [[ ! -d /opt/ProxmoxVE-Local ]]; then
2727
msg_error "No ${APP} Installation Found!"
2828
exit
2929
fi
30-
msg_info "No Update function implementd"
30+
31+
if check_for_gh_release "ProxmoxVE-Local" "community-scripts/ProxmoxVE-Local"; then
32+
msg_info "Stopping Services"
33+
systemctl stop pvescriptslocal
34+
msg_ok "Stopped Services"
35+
36+
msg_info "Backup Data"
37+
cp /opt/ProxmoxVE-Local/.env /opt/.env.bak
38+
cp -r /opt/ProxmoxVE-Local/data /opt/data.bak
39+
msg_ok "Backed up Data"
40+
41+
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "ProxmoxVE-Local" "community-scripts/ProxmoxVE-Local"
42+
43+
msg_info "Restoring Data"
44+
if [[ -f /opt/.env.bak ]]; then
45+
mv /opt/.env.bak /opt/ProxmoxVE-Local/.env
46+
fi
47+
if [[ -d /opt/data.bak ]]; then
48+
rm -rf /opt/ProxmoxVE-Local/data
49+
mv /opt/data.bak /opt/ProxmoxVE-Local/data
50+
fi
51+
msg_ok "Restored Data"
52+
53+
msg_info "Updating PVE Scripts local"
54+
cd /opt/ProxmoxVE-Local
55+
chmod 755 data
56+
$STD npm install
57+
$STD npm run build
58+
msg_ok "Updated PVE Scripts local"
59+
60+
msg_info "Starting Services"
61+
systemctl start pvescriptslocal
62+
msg_ok "Started Services"
63+
msg_ok "Updated Successfully"
64+
fi
3165
exit
3266
}
3367

frontend/public/json/pve-scripts-local.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
],
77
"date_created": "2025-10-03",
88
"type": "ct",
9-
"updateable": false,
9+
"updateable": true,
1010
"privileged": false,
1111
"interface_port": 3000,
1212
"documentation": "https://github.com/community-scripts/ProxmoxVE-Local",
1313
"config_path": "/opt/PVEScripts-Local/.env",
1414
"website": "https://community-scripts.github.io/ProxmoxVE",
15-
"logo": "https://community-scripts.github.io/ProxmoxVE/logo.png",
15+
"logo": "https://raw.githubusercontent.com/community-scripts/ProxmoxVE-Local/refs/heads/main/.github/logo.png",
1616
"description": "A modern web-based management interface for Proxmox VE (PVE) helper scripts. This tool provides a user-friendly way to discover, download, and execute community-sourced Proxmox scripts locally with real-time terminal output streaming.",
1717
"install_methods": [
1818
{

install/pve-scripts-local-install.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ network_check
1313
update_os
1414

1515
msg_info "Installing Dependencies"
16-
$STD apt-get update
17-
$STD apt-get install -y \
16+
$STD apt install -y \
1817
build-essential \
1918
sshpass \
2019
rsync \

0 commit comments

Comments
 (0)