mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-11-06 13:34:57 +01:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2ba49aa3f3 | |||
| 34affb81cf |
@@ -571,21 +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
|
||||
|
||||
- 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))
|
||||
- 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: 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))
|
||||
- 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))
|
||||
|
||||
## 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"
|
||||
|
||||
+15
-9
@@ -47,7 +47,7 @@ function check_disk_space() {
|
||||
}
|
||||
|
||||
TEMP_DIR=$(mktemp -d)
|
||||
if ! check_disk_space "$TEMP_DIR" 4 && [ -d "/var/tmp" ] && check_disk_space "/var/tmp" 4; then
|
||||
if ! check_disk_space "$TEMP_DIR" 20 && [ -d "/var/tmp" ] && check_disk_space "/var/tmp" 20; then
|
||||
rm -rf "$TEMP_DIR"
|
||||
TEMP_DIR=$(mktemp -d /var/tmp/opnsense-vm.XXXXXX)
|
||||
fi
|
||||
@@ -364,6 +364,15 @@ FREEBSD_VER="$VM_INDEX_LATEST"
|
||||
URL="$VM_INDEX_URL"
|
||||
msg_ok "Download URL: ${CL}${BL}${URL}${CL}"
|
||||
|
||||
# Check available disk space (require at least 20GB for safety)
|
||||
if ! check_disk_space "$TEMP_DIR" 20; then
|
||||
AVAILABLE_GB=$(df -h "$TEMP_DIR" | awk 'NR==2 {print $4}')
|
||||
msg_error "Insufficient disk space in temporary directory ($TEMP_DIR)."
|
||||
msg_error "Available: ${AVAILABLE_GB}, Required: ~20GB for FreeBSD image decompression."
|
||||
msg_error "Please free up space or ensure /tmp has sufficient storage."
|
||||
exit 214
|
||||
fi
|
||||
|
||||
msg_info "Downloading FreeBSD Image"
|
||||
# A mirror serving an error page returns 200, so size decides whether this
|
||||
# is an image. Anything real here is far above 5 MB.
|
||||
@@ -372,14 +381,11 @@ vm_fetch_image "$URL" "$CACHE_FILE" --cache --verify-xz --min-bytes $((5 * 1024
|
||||
echo -en "\e[1A\e[0K"
|
||||
msg_ok "Downloaded ${CL}${BL}$(basename "$CACHE_FILE")${CL}"
|
||||
|
||||
# The download sits in the image cache; only the unpacked image (2.5 GB for
|
||||
# FreeBSD 15.1, not 20) lands in TEMP_DIR, and xz knows its size up front.
|
||||
NEED_GB=$(($(xz --robot -l "$CACHE_FILE" | awk '$1 == "totals" {print $5}') / 1024 / 1024 / 1024 + 1))
|
||||
if ! check_disk_space "$TEMP_DIR" "$NEED_GB"; then
|
||||
# Check disk space again before decompression
|
||||
if ! check_disk_space "$TEMP_DIR" 15; then
|
||||
AVAILABLE_GB=$(df -h "$TEMP_DIR" | awk 'NR==2 {print $4}')
|
||||
msg_error "Insufficient disk space for decompression in ${TEMP_DIR}."
|
||||
msg_error "Available: ${AVAILABLE_GB}, Required: ~${NEED_GB}GB for the decompressed image."
|
||||
msg_error "Please free up space or ensure /tmp or /var/tmp has sufficient storage."
|
||||
msg_error "Insufficient disk space for decompression."
|
||||
msg_error "Available: ${AVAILABLE_GB}, Required: ~15GB for decompressed image."
|
||||
exit 214
|
||||
fi
|
||||
|
||||
@@ -411,7 +417,7 @@ while :; do
|
||||
alloc_delay=$((alloc_delay * 2))
|
||||
continue
|
||||
fi
|
||||
msg_error "Could not allocate the EFI disk on ${STORAGE}: ${alloc_err}"
|
||||
echo -e "$alloc_err" >&2
|
||||
exit 220
|
||||
done
|
||||
vm_import_disk "$VMID" "$FILE" "$STORAGE"
|
||||
|
||||
Reference in New Issue
Block a user