mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-11-03 20:14:31 +01:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2ba49aa3f3 | |||
| 34affb81cf |
@@ -571,23 +571,6 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
||||
|
||||
</details>
|
||||
|
||||
## 2026-11-03
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- Tracearr: move to Node.js 26 [@connorgallopo](https://github.com/connorgallopo) ([#18393](https://github.com/community-scripts/ProxmoxVE/pull/18393))
|
||||
|
||||
### 💾 Core
|
||||
|
||||
- fix: pve-LXC: say when the container went away during its setup [@MickLesk](https://github.com/MickLesk) ([core#192](https://github.com/community-scripts/core/pull/192))
|
||||
- fix: treat Esc in a VM wizard dialog as leaving the script [@MickLesk](https://github.com/MickLesk) ([core#190](https://github.com/community-scripts/core/pull/190))
|
||||
- ref: count a container stopped during a detached install as an abort [@MickLesk](https://github.com/MickLesk) ([core#187](https://github.com/community-scripts/core/pull/187))
|
||||
- feat: find the assets of a renamed GitHub repo without the API [@MickLesk](https://github.com/MickLesk) ([core#188](https://github.com/community-scripts/core/pull/188))
|
||||
- fix: restore npm when an interrupted update left it behind [@MickLesk](https://github.com/MickLesk) ([core#189](https://github.com/community-scripts/core/pull/189))
|
||||
- feat: add var_cmode to set the container console mode [@MickLesk](https://github.com/MickLesk) ([core#180](https://github.com/community-scripts/core/pull/180))
|
||||
|
||||
## 2026-11-02
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
Executable
+83
@@ -0,0 +1,83 @@
|
||||
#!/usr/bin/env bash
|
||||
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: uchouT (uchouT)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/OpenListTeam/OpenList/
|
||||
|
||||
APP="OpenList"
|
||||
var_tags="${var_tags:-files;storage}"
|
||||
var_cpu="${var_cpu:-1}"
|
||||
var_arm64="${var_arm64:-yes}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
var_ram="${var_ram:-1024}"
|
||||
var_disk="${var_disk:-6}"
|
||||
var_version="${var_version:-13}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
run_os_update
|
||||
}
|
||||
|
||||
update_deb_based() {
|
||||
if [[ ! -f /opt/openlist/openlist ]]; then
|
||||
msg_error "No OpenList Installation Found!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if check_for_gh_release "openlist" "OpenListTeam/OpenList"; then
|
||||
msg_info "Stopping OpenList"
|
||||
systemctl stop openlist
|
||||
msg_ok "Stopped OpenList"
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "openlist" "OpenListTeam/OpenList" "prebuild" "latest" "/opt/openlist" "openlist-linux-musl-$(arch_resolve "amd64" "arm64").tar.gz"
|
||||
|
||||
msg_info "Starting OpenList"
|
||||
systemctl start openlist
|
||||
msg_ok "Started OpenList"
|
||||
msg_ok "Updated successfully!"
|
||||
fi
|
||||
}
|
||||
|
||||
update_alpine() {
|
||||
if [[ ! -f /opt/openlist/openlist ]]; then
|
||||
msg_error "No OpenList Installation Found!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
msg_info "Updating Alpine Packages"
|
||||
$STD apk -U upgrade
|
||||
msg_ok "Updated Alpine Packages"
|
||||
|
||||
if check_for_gh_release "openlist" "OpenListTeam/OpenList"; then
|
||||
msg_info "Stopping OpenList"
|
||||
$STD rc-service openlist stop
|
||||
msg_ok "Stopped OpenList"
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "openlist" "OpenListTeam/OpenList" "prebuild" "latest" "/opt/openlist" "openlist-linux-musl-$(arch_resolve "amd64" "arm64").tar.gz"
|
||||
|
||||
msg_info "Starting OpenList"
|
||||
$STD rc-service openlist start
|
||||
msg_ok "Started OpenList"
|
||||
msg_ok "Updated successfully!"
|
||||
fi
|
||||
}
|
||||
|
||||
start
|
||||
build_container
|
||||
description
|
||||
|
||||
msg_ok "Completed Successfully!\n"
|
||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||
echo -e "${INFO}${YW}Access it using the following URL:${CL}"
|
||||
echo -e "${GATEWAY}${BGN}http://${IP}:5244${CL}"
|
||||
echo -e "${INFO}${YW}Credentials saved in:${CL}"
|
||||
echo -e "${TAB}/root/openlist.creds"
|
||||
+1
-1
@@ -30,7 +30,7 @@ function update_script() {
|
||||
exit
|
||||
fi
|
||||
|
||||
NODE_VERSION="26" setup_nodejs
|
||||
NODE_VERSION="24" setup_nodejs
|
||||
|
||||
msg_info "Updating prestart script"
|
||||
cat <<EOF >/data/tracearr/prestart.sh
|
||||
|
||||
Executable
+90
@@ -0,0 +1,90 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: uchouT (uchouT)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/OpenListTeam/OpenList/
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
fetch_and_deploy_gh_release "openlist" "OpenListTeam/OpenList" "prebuild" "latest" "/opt/openlist" "openlist-linux-musl-$(arch_resolve "amd64" "arm64").tar.gz"
|
||||
|
||||
msg_info "Setting up OpenList"
|
||||
ADMIN_PASS="$(head -c 256 /dev/urandom | tr -dc 'A-Za-z0-9')"
|
||||
ADMIN_PASS="${ADMIN_PASS:0:16}"
|
||||
$STD /opt/openlist/openlist --data /opt/openlist_data admin set "$ADMIN_PASS"
|
||||
if [[ ! -f /opt/openlist_data/data.db ]]; then
|
||||
msg_error "OpenList did not initialise its database"
|
||||
exit 1
|
||||
fi
|
||||
{
|
||||
echo "OpenList Credentials"
|
||||
echo "Username: admin"
|
||||
echo "Password: ${ADMIN_PASS}"
|
||||
} >~/openlist.creds
|
||||
chmod 600 ~/openlist.creds
|
||||
msg_ok "Set up OpenList"
|
||||
|
||||
setup_deb_based() {
|
||||
msg_info "Creating OpenList Service"
|
||||
cat <<EOF >/etc/systemd/system/openlist.service
|
||||
[Unit]
|
||||
Description=OpenList
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/opt/openlist
|
||||
ExecStart=/opt/openlist/openlist server --data /opt/openlist_data
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now openlist
|
||||
msg_ok "Created OpenList Service"
|
||||
}
|
||||
|
||||
setup_alpine() {
|
||||
msg_info "Creating OpenList Service"
|
||||
cat <<'EOF' >/etc/init.d/openlist
|
||||
#!/sbin/openrc-run
|
||||
name="OpenList"
|
||||
description="OpenList - a file list program that supports multiple storages"
|
||||
|
||||
command="/opt/openlist/openlist"
|
||||
command_args="server --data /opt/openlist_data"
|
||||
supervisor=supervise-daemon
|
||||
directory="/opt/openlist"
|
||||
output_log="/var/log/openlist.log"
|
||||
error_log="/var/log/openlist.log"
|
||||
respawn_delay=10
|
||||
|
||||
depend() {
|
||||
need net
|
||||
after firewall
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
checkpath -f -m 0640 "$output_log"
|
||||
}
|
||||
EOF
|
||||
chmod +x /etc/init.d/openlist
|
||||
$STD rc-update add openlist default
|
||||
$STD rc-service openlist start
|
||||
msg_ok "Created OpenList Service"
|
||||
}
|
||||
|
||||
run_os_setup
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
@@ -17,7 +17,7 @@ msg_info "Installing Dependencies"
|
||||
$STD apt install -y redis-server
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
NODE_VERSION="26" NODE_MODULE="corepack" setup_nodejs
|
||||
NODE_VERSION="24" NODE_MODULE="corepack" setup_nodejs
|
||||
PG_VERSION="18" setup_postgresql
|
||||
|
||||
msg_info "Installing pnpm"
|
||||
|
||||
+13
-20
@@ -271,22 +271,15 @@ function dry_run_container() {
|
||||
fi
|
||||
}
|
||||
|
||||
# The line of vzdump or pct restore output that says why it failed.
|
||||
function failure_reason() {
|
||||
local reason
|
||||
reason=$(grep -m1 '^ERROR:' <<<"$1" | sed 's/^ERROR: //')
|
||||
[[ -n "$reason" ]] || reason=$(grep -v '^[[:space:]]*$' <<<"$1" | tail -n1)
|
||||
printf '%s' "$reason"
|
||||
}
|
||||
|
||||
function backup_container() {
|
||||
msg_info "Creating backup for container $1"
|
||||
local output
|
||||
if output=$(vzdump $1 --compress zstd --storage $STORAGE_CHOICE -notes-template "{{guestname}} - community-scripts backup updater" 2>&1); then
|
||||
vzdump $1 --compress zstd --storage $STORAGE_CHOICE -notes-template "{{guestname}} - community-scripts backup updater" >/dev/null 2>&1
|
||||
status=$?
|
||||
|
||||
if [ $status -eq 0 ]; then
|
||||
msg_ok "Backup created"
|
||||
else
|
||||
log_write "Container $1: vzdump failed:"$'\n'"$output"
|
||||
msg_error "Backup failed for container $1: $(failure_reason "$output")"
|
||||
msg_error "Backup failed for container $1"
|
||||
exit 235
|
||||
fi
|
||||
}
|
||||
@@ -344,7 +337,7 @@ function log_write() {
|
||||
|
||||
# Skip confirmation if var_skip_confirm is set to yes
|
||||
if [[ "$var_skip_confirm" != "yes" ]]; then
|
||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "LXC App Update" --yesno "This will update apps in LXCs installed by Helper-Scripts. Proceed?" 10 58 || exit 0
|
||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "LXC App Update" --yesno "This will update apps in LXCs installed by Helper-Scripts. Proceed?" 10 58 || exit
|
||||
fi
|
||||
|
||||
tags_formatted="${var_tags//|/, }"
|
||||
@@ -467,11 +460,12 @@ if [ "$BACKUP_CHOICE" == "yes" ]; then
|
||||
# Determine storage based on var_backup_storage
|
||||
if [[ -n "$var_backup_storage" ]]; then
|
||||
# Validate that the specified storage exists and supports backups
|
||||
if grep -qxF -- "$var_backup_storage" <<<"$STORAGES"; then
|
||||
if echo "$STORAGES" | grep -qw "$var_backup_storage"; then
|
||||
STORAGE_CHOICE="$var_backup_storage"
|
||||
msg_ok "Using backup storage: $STORAGE_CHOICE"
|
||||
else
|
||||
msg_error "Specified backup storage '$var_backup_storage' not found or doesn't support backups! Available: $(echo $STORAGES)"
|
||||
msg_error "Specified backup storage '$var_backup_storage' not found or doesn't support backups!"
|
||||
msg_info "Available storages: $(echo $STORAGES | tr '\n' ' ')"
|
||||
exit 119
|
||||
fi
|
||||
else
|
||||
@@ -648,7 +642,7 @@ for container in $CHOICE; do
|
||||
log_result "$container" "$service" "SKIPPED" "Storage critically low on /boot (>80%)"
|
||||
log_write "Container $container ($service): SKIPPED — storage critically low on /boot"
|
||||
elif [ "$BACKUP_CHOICE" == "yes" ]; then
|
||||
msg_error "Update failed for container $container ($service, exit code: $exit_code) — attempting restore"
|
||||
msg_error "Update failed for container $container (exit code: $exit_code) — attempting restore"
|
||||
log_write "Container $container ($service): FAILED (exit $exit_code) — attempting restore"
|
||||
msg_info "Restoring LXC $container from backup ($STORAGE_CHOICE)"
|
||||
pct stop $container
|
||||
@@ -660,7 +654,7 @@ for container in $CHOICE; do
|
||||
log_write "Container $container ($service): FAILED — no backup found for restore"
|
||||
exit 235
|
||||
fi
|
||||
restore_output=$(pct restore $container "$BACKUP_ENTRY" --storage $LXC_STORAGE --force 2>&1)
|
||||
pct restore $container "$BACKUP_ENTRY" --storage $LXC_STORAGE --force >/dev/null 2>&1
|
||||
restorestatus=$?
|
||||
if [ $restorestatus -eq 0 ]; then
|
||||
pct start $container
|
||||
@@ -668,14 +662,13 @@ for container in $CHOICE; do
|
||||
log_result "$container" "$service" "RESTORED" "Update failed (exit $exit_code) — restored from backup"
|
||||
log_write "Container $container ($service): RESTORED from $BACKUP_ENTRY"
|
||||
else
|
||||
log_write "Container $container: pct restore failed:"$'\n'"$restore_output"
|
||||
msg_error "Restore failed for container $container: $(failure_reason "$restore_output")"
|
||||
msg_error "Restore failed for container $container"
|
||||
log_result "$container" "$service" "FAILED" "Update failed (exit $exit_code) — restore also failed"
|
||||
log_write "Container $container ($service): FAILED — restore also failed"
|
||||
exit 235
|
||||
fi
|
||||
else
|
||||
msg_error "Update failed for container $container ($service, exit code: $exit_code)"
|
||||
msg_error "Update failed for container $container (exit code: $exit_code)"
|
||||
log_result "$container" "$service" "FAILED" "Exit code $exit_code"
|
||||
log_write "Container $container ($service): FAILED (exit $exit_code)"
|
||||
if [[ "$var_continue_on_error" == "yes" ]]; then
|
||||
|
||||
Reference in New Issue
Block a user