Compare commits

..

1 Commits

Author SHA1 Message Date
MickLesk
f136e1786d OpenWRT VM: use poweroff instead of halt to properly stop VM 2026-04-03 20:54:59 +02:00
7 changed files with 12 additions and 68 deletions

View File

@@ -437,32 +437,10 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- OpenWRT-VM: use poweroff instead of halt to properly stop VM [@MickLesk](https://github.com/MickLesk) ([#13504](https://github.com/community-scripts/ProxmoxVE/pull/13504))
- NginxProxyManager: fix openresty restart by setting user root before reload [@MickLesk](https://github.com/MickLesk) ([#13500](https://github.com/community-scripts/ProxmoxVE/pull/13500))
- #### ✨ New Features
- Crafty Controller: add Java 25 for Minecraft 1.26.1+ [@MickLesk](https://github.com/MickLesk) ([#13502](https://github.com/community-scripts/ProxmoxVE/pull/13502))
- Wealthfolio: update to v3.2.1 and Node.js 24 [@afadil](https://github.com/afadil) ([#13486](https://github.com/community-scripts/ProxmoxVE/pull/13486))
### 💾 Core
- #### 🐞 Bug Fixes
- core.func: prevent profile.d scripts from aborting on non-zero exit [@MickLesk](https://github.com/MickLesk) ([#13503](https://github.com/community-scripts/ProxmoxVE/pull/13503))
- #### ✨ New Features
- APT Proxy: Support full URLs (http/https with custom ports) [@MickLesk](https://github.com/MickLesk) ([#13474](https://github.com/community-scripts/ProxmoxVE/pull/13474))
### 🧰 Tools
- #### 🐞 Bug Fixes
- PVE LXC-Updater: pipe apt list through cat to prevent pager hang [@MickLesk](https://github.com/MickLesk) ([#13501](https://github.com/community-scripts/ProxmoxVE/pull/13501))
## 2026-04-02
### 🚀 Updated Scripts

View File

@@ -92,7 +92,6 @@ ExecStart=/usr/local/openresty/nginx/sbin/nginx -g 'daemon off;'
[Install]
WantedBy=multi-user.target
EOF
sed -i 's/user npm/user root/g; s/^pid/#pid/g' /usr/local/openresty/nginx/conf/nginx.conf
systemctl daemon-reload
systemctl unmask openresty 2>/dev/null || true
systemctl restart openresty

View File

@@ -15,8 +15,8 @@ update_os
msg_info "Setting up TemurinJDK"
setup_java
$STD apt install -y temurin-{8,11,17,21,25}-jre
sudo update-alternatives --set java /usr/lib/jvm/temurin-25-jre-amd64/bin/java
$STD apt install -y temurin-{8,11,17,21}-jre
sudo update-alternatives --set java /usr/lib/jvm/temurin-21-jre-amd64/bin/java
msg_ok "Installed TemurinJDK"
msg_info "Setup Python3"
@@ -59,7 +59,7 @@ After=network.target
Type=simple
User=crafty
WorkingDirectory=/opt/crafty-controller/crafty/crafty-4
Environment=PATH=/usr/lib/jvm/temurin-25-jre-amd64/bin:/opt/crafty-controller/crafty/.venv/bin:$PATH
Environment=PATH=/usr/lib/jvm/temurin-21-jre-amd64/bin:/opt/crafty-controller/crafty/.venv/bin:$PATH
ExecStart=/opt/crafty-controller/crafty/.venv/bin/python3 main.py -d
Restart=on-failure

View File

@@ -986,23 +986,13 @@ base_settings() {
# Runtime check: Verify APT cacher is reachable if configured
if [[ -n "$APT_CACHER_IP" && "$APT_CACHER" == "yes" ]]; then
local _check_host _check_port _check_url
_check_host=$(echo "$APT_CACHER_IP" | sed -e 's|https\?://||' -e 's|/.*||' | cut -d: -f1)
_check_port=$(echo "$APT_CACHER_IP" | sed -e 's|https\?://||' -e 's|/.*||' | cut -s -d: -f2)
if [[ "$APT_CACHER_IP" =~ ^https?:// ]]; then
_check_url="$APT_CACHER_IP"
_check_port="${_check_port:-80}"
else
_check_port="${_check_port:-3142}"
_check_url="http://${APT_CACHER_IP}:${_check_port}"
fi
if ! curl -s --connect-timeout 2 "${_check_url}" >/dev/null 2>&1; then
msg_warn "APT Cacher configured but not reachable at ${_check_url}"
if ! curl -s --connect-timeout 2 "http://${APT_CACHER_IP}:3142" >/dev/null 2>&1; then
msg_warn "APT Cacher configured but not reachable at ${APT_CACHER_IP}:3142"
msg_custom "⚠️" "${YW}" "Disabling APT Cacher for this installation"
APT_CACHER=""
APT_CACHER_IP=""
else
msg_ok "APT Cacher verified at ${_check_url}"
msg_ok "APT Cacher verified at ${APT_CACHER_IP}:3142"
fi
fi
@@ -1209,13 +1199,6 @@ load_vars_file() {
continue
fi
;;
var_apt_cacher_ip)
# Allow: plain IP/hostname, http://host, https://host:port
if [[ -n "$var_val" ]] && ! [[ "$var_val" =~ ^(https?://)?[a-zA-Z0-9._-]+(:[0-9]+)?(/.*)?$ ]]; then
msg_warn "Invalid APT Cacher address '$var_val' in $file, ignoring"
continue
fi
;;
var_container_storage | var_template_storage)
# Validate that the storage exists and is active on the current node
local _storage_status
@@ -1328,11 +1311,9 @@ var_ipv6_method=none
var_ssh=no
# var_ssh_authorized_key=
# APT cacher (optional - IP or URL)
# APT cacher (optional - with example)
# var_apt_cacher=yes
# var_apt_cacher_ip=192.168.1.10
# var_apt_cacher_ip=http://proxy.local
# var_apt_cacher_ip=https://proxy.local:443
# Features/Tags/verbosity
var_fuse=no
@@ -2545,7 +2526,7 @@ advanced_settings() {
# Ask for IP if enabled
if result=$(whiptail --backtitle "Proxmox VE Helper Scripts [Step $STEP/$MAX_STEP]" \
--title "APT CACHER IP" \
--inputbox "\nEnter APT Cacher-NG IP or URL:\n(e.g. 192.168.1.10, http://host, https://host:443)" 12 62 "$_apt_cacher_ip" \
--inputbox "\nEnter APT Cacher-NG server IP address:" 10 58 "$_apt_cacher_ip" \
3>&1 1>&2 2>&3); then
_apt_cacher_ip="$result"
fi

View File

@@ -143,7 +143,7 @@ ensure_profile_loaded() {
# Source all profile.d scripts to ensure PATH is complete
if [[ -d /etc/profile.d ]]; then
for script in /etc/profile.d/*.sh; do
[[ -r "$script" ]] && source "$script" || true
[[ -r "$script" ]] && source "$script"
done
fi

View File

@@ -390,24 +390,10 @@ update_os() {
msg_info "Updating Container OS"
if [[ "$CACHER" == "yes" ]]; then
echo 'Acquire::http::Proxy-Auto-Detect "/usr/local/bin/apt-proxy-detect.sh";' >/etc/apt/apt.conf.d/00aptproxy
local _proxy_raw="${CACHER_IP}"
local _proxy_host _proxy_port _proxy_url
# Parse host and port from URL or plain IP/hostname
_proxy_host=$(echo "$_proxy_raw" | sed -e 's|https\?://||' -e 's|/.*||' | cut -d: -f1)
_proxy_port=$(echo "$_proxy_raw" | sed -e 's|https\?://||' -e 's|/.*||' | cut -s -d: -f2)
if [[ "$_proxy_raw" =~ ^https?:// ]]; then
# Full URL provided — use as-is for proxy output, extract port for nc check
_proxy_url="$_proxy_raw"
_proxy_port="${_proxy_port:-80}"
else
# Legacy: plain IP or hostname — default to http + port 3142
_proxy_port="${_proxy_port:-3142}"
_proxy_url="http://${_proxy_raw}:${_proxy_port}"
fi
cat <<EOF >/usr/local/bin/apt-proxy-detect.sh
#!/bin/bash
if nc -w1 -z "${_proxy_host}" ${_proxy_port}; then
echo -n "${_proxy_url}"
if nc -w1 -z "${CACHER_IP}" 3142; then
echo -n "http://${CACHER_IP}:3142"
else
echo -n "DIRECT"
fi

View File

@@ -78,7 +78,7 @@ function update_container() {
alpine) pct exec "$container" -- ash -c "apk -U upgrade" ;;
archlinux) pct exec "$container" -- bash -c "pacman -Syyu --noconfirm" ;;
fedora | rocky | centos | alma) pct exec "$container" -- bash -c "dnf -y update && dnf -y upgrade" ;;
ubuntu | debian | devuan) pct exec "$container" -- bash -c "apt-get update 2>/dev/null | grep 'packages.*upgraded'; apt list --upgradable 2>/dev/null | cat && apt-get -yq dist-upgrade 2>&1; rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED || true" ;;
ubuntu | debian | devuan) pct exec "$container" -- bash -c "apt-get update 2>/dev/null | grep 'packages.*upgraded'; apt list --upgradable && apt-get -yq dist-upgrade 2>&1; rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED || true" ;;
opensuse) pct exec "$container" -- bash -c "zypper ref && zypper --non-interactive dup" ;;
esac
}