Compare commits

..
Author SHA1 Message Date
MickLesk d6fd69f692 Frigate: bump to v0.18.2 2026-10-23 20:41:18 +02:00
community-scripts-pr-app[bot]andgithub-actions[bot] 500a860faf Update CHANGELOG.md (#18113)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-10-23 13:50:36 +00:00
community-scripts-pr-app[bot]andgithub-actions[bot] f7dcae32a8 Update CHANGELOG.md (#18112)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-10-23 13:50:10 +00:00
CanbiZ (MickLesk) 4f88fba713 InvoiceShelf: run the Laravel scheduler (#18079)
Without the schedule:run cron job, recurring invoices and other scheduled tasks never ran (#18072). Update adds it to existing installs.
2026-10-23 15:50:05 +02:00
CanbiZ (MickLesk) 5a5b0b4a2e podman-homeassistant: require Debian 13 (#18095)
Quadlet needs Podman 4.4; Debian 12 ships 4.3.1, so no unit was
generated and systemctl start failed with 5.
2026-10-23 15:49:35 +02:00
community-scripts-pr-app[bot]andgithub-actions[bot] e40e1c3f9e Update CHANGELOG.md (#18111)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-10-23 13:48:30 +00:00
CanbiZ (MickLesk) 2d68523f89 proxcenter: skip the type check and lower the build heap (#18090)
Upstream added PROXCENTER_SKIP_TYPECHECK for builds from a released tag;
the type check alone needs about 3 GB. A 4.6 GB heap on 6 GB of RAM got
the build killed.
2026-10-23 15:48:07 +02:00
community-scripts-pr-app[bot]andgithub-actions[bot] 507ccb85c2 Update CHANGELOG.md (#18110)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-10-23 13:48:00 +00:00
CanbiZ (MickLesk) e3bcb63608 hermesagent: retry the installer download, fall back to GitHub (#18091)
The Vercel host answered 4xx/5xx 21 times a week; a plain curl gave up
at once.
2026-10-23 15:47:47 +02:00
CanbiZ (MickLesk) 363de2146c zabbix: use the arm64 repository for 7.0 (#18089)
7.0's debian repository carries no arm64 packages; they live under
debian-arm64. The ct sets var_arm64=yes, so the install failed at the
package step.
2026-10-23 15:47:31 +02:00
community-scripts-pr-app[bot]andgithub-actions[bot] cc868ffba3 Update CHANGELOG.md (#18109)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-10-23 13:46:40 +00:00
CanbiZ (MickLesk) 1385f9eb71 postgresql: default the version prompt and match Alpine's packages (#18093)
An empty answer, or no TTY, ended the install with 64. The prompt now
defaults to 17 and takes var_postgresql_version; the Alpine list is
16/17/18, which is what 3.24 ships.
2026-10-23 15:46:07 +02:00
community-scripts-pr-app[bot]andgithub-actions[bot] 8360169273 Update CHANGELOG.md (#18108)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-10-23 13:46:03 +00:00
CanbiZ (MickLesk) 5a065790a8 kasm: survive a failed release lookup and answer the installer with flags (#18092)
The lookup ran under pipefail with no timeout: a page without the link
ended the install at `head -1`, a stalled connection hung it for half an
hour, and the fallback version never ran. The installer takes
--accept-eula, --no-swap-check and --no-check-disk; piped answers
shifted with the prompts, and a "y" to the swap question tried swapon
inside the container.
2026-10-23 15:45:32 +02:00
community-scripts-pr-app[bot]andgithub-actions[bot] 20b0caf260 Update CHANGELOG.md (#18107)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-10-23 13:42:28 +00:00
community-scripts-pr-app[bot]andgithub-actions[bot] 0ab4ff9187 Update CHANGELOG.md (#18106)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-10-23 13:42:05 +00:00
CanbiZ (MickLesk) fab965b3c7 apache-guacamole: require Debian 13 (#18094)
freerdp3-dev exists from Trixie on; a Debian 12 override failed at the
dependency install.
2026-10-23 15:42:03 +02:00
CanbiZ (MickLesk) c2a4db2c7f unifi-os-server: require Debian 13 (#18096)
Every failed install this week ran on Debian 12, where the installer
rejects the Podman that ships there. The default is 13; an override now
fails before the 785 MB download.
2026-10-23 15:41:53 +02:00
CanbiZ (MickLesk) 8df4381b7c openwebui: drop the Intel oneAPI Base Toolkit (#18098)
The Ollama release binaries carry no SYCL build, so the 2.8 GB download
was never used. Its handled failure was also what later systemctl
failures were reported as.
2026-10-23 15:41:37 +02:00
community-scripts-pr-app[bot]andgithub-actions[bot] f9baff39a7 Update CHANGELOG.md (#18105)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-10-23 13:41:16 +00:00
CanbiZ (MickLesk) 449c3d4997 ollama: drop the Intel oneAPI Base Toolkit (#18097)
The Ollama release binaries carry no SYCL build, so the 2.8 GB download
(14.6 GB installed) was never used; 13 installs a week failed on it.
2026-10-23 15:40:41 +02:00
community-scripts-pr-app[bot]andgithub-actions[bot] a6367da0c3 Update CHANGELOG.md (#18104)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-10-23 13:27:47 +00:00
community-scripts-pr-app[bot]andgithub-actions[bot] dcc593947d Update CHANGELOG.md (#18103)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-10-23 13:27:34 +00:00
CanbiZ (MickLesk) 1588926a1e Storyteller: build the runtime like upstream's Dockerfile (#18083)
* Storyteller: build the runtime like upstream's Dockerfile

Only the Next.js app was built before. The standalone server now also gets the worker and file-write-worker bundles, the native align prebuilds, the icu-segmentation wasm, @parcel/watcher and kuromoji, plus the env vars that point at them, and whisper.cpp with the tiny.en model is installed through ghost-story's CLI. Packages and the readium version follow upstream (#16628).

Update still used the pre-monorepo paths, and CLEAN_INSTALL wiped /opt/storyteller including the data directory; it now keeps data/, rebuilds the same way and rewrites the unit, so existing installs move over.

* Storyteller: follow the script conventions

python3 ships with the template, update uses ensure_dependencies, no comments.

* Refactor storyteller.sh for improved deployment process
2026-10-23 15:27:13 +02:00
CanbiZ (MickLesk) 39f0920ac7 tdarr: do not let a failed or slow updater block the service start (#18100)
ExecStartPre ran Tdarr_Updater without the - prefix under the default
90 s start timeout, so no route to tdarr.io or a slow download failed
`systemctl enable --now` at the end of the install.
2026-10-23 15:27:08 +02:00
CanbiZ (MickLesk) cedc440446 immich: install mise from its GitHub release, retry jellyfin-ffmpeg, default the ML prompt (#18099)
The mise apt repository keeps one version and caches its index for a
day; with near-daily mise releases the index points at a deleted deb
and the install ends with 100 (18 a week). The binary comes from the
release instead, on new containers and on updates that have none yet.
jellyfin-ffmpeg7 failed on mirror hiccups; it goes through the retrying
installer. The machine-learning prompt ended the install without a TTY.
2026-10-23 15:27:06 +02:00
community-scripts-pr-app[bot]andgithub-actions[bot] 8692f16e80 Update CHANGELOG.md (#18102)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-10-23 11:57:01 +00:00
CanbiZ (MickLesk) 41b51b121d Refactor: pimox-haos-vm (#18077)
Updated copyright information and improved script structure. Added error handling and enhanced variable management.
2026-10-23 13:56:31 +02:00
community-scripts-pr-app[bot]andgithub-actions[bot] a4eb27013c Update CHANGELOG.md (#18088)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-10-23 10:05:44 +00:00
community-scripts-pr-app[bot]andgithub-actions[bot] 7785082d60 Update CHANGELOG.md (#18087)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-10-23 10:04:02 +00:00
community-scripts-pr-app[bot]andgithub-actions[bot] 65e08ee708 Update CHANGELOG.md (#18084)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-10-23 09:30:48 +00:00
20 changed files with 192 additions and 509 deletions

No files matched your search

+32 -1
View File
@@ -567,9 +567,40 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
## 2026-10-23
### 🚀 Updated Scripts
- postgresql: default the version prompt and match Alpine's packages [@MickLesk](https://github.com/MickLesk) ([#18093](https://github.com/community-scripts/ProxmoxVE/pull/18093))
- Storyteller: build the runtime like upstream's Dockerfile [@MickLesk](https://github.com/MickLesk) ([#18083](https://github.com/community-scripts/ProxmoxVE/pull/18083))
- #### 🐞 Bug Fixes
- proxcenter: skip the type check and lower the build heap [@MickLesk](https://github.com/MickLesk) ([#18090](https://github.com/community-scripts/ProxmoxVE/pull/18090))
- hermesagent: retry the installer download, fall back to GitHub [@MickLesk](https://github.com/MickLesk) ([#18091](https://github.com/community-scripts/ProxmoxVE/pull/18091))
- zabbix: use the arm64 repository for 7.0 [@MickLesk](https://github.com/MickLesk) ([#18089](https://github.com/community-scripts/ProxmoxVE/pull/18089))
- kasm: survive a failed release lookup and answer the installer with flags [@MickLesk](https://github.com/MickLesk) ([#18092](https://github.com/community-scripts/ProxmoxVE/pull/18092))
- #### ✨ New Features
- InvoiceShelf: run the Laravel scheduler [@MickLesk](https://github.com/MickLesk) ([#18079](https://github.com/community-scripts/ProxmoxVE/pull/18079))
- #### 🔧 Refactor
- podman-homeassistant: require Debian 13 [@MickLesk](https://github.com/MickLesk) ([#18095](https://github.com/community-scripts/ProxmoxVE/pull/18095))
- apache-guacamole: require Debian 13 [@MickLesk](https://github.com/MickLesk) ([#18094](https://github.com/community-scripts/ProxmoxVE/pull/18094))
- unifi-os-server: require Debian 13 [@MickLesk](https://github.com/MickLesk) ([#18096](https://github.com/community-scripts/ProxmoxVE/pull/18096))
- openwebui: drop the Intel oneAPI Base Toolkit [@MickLesk](https://github.com/MickLesk) ([#18098](https://github.com/community-scripts/ProxmoxVE/pull/18098))
- ollama: drop the Intel oneAPI Base Toolkit [@MickLesk](https://github.com/MickLesk) ([#18097](https://github.com/community-scripts/ProxmoxVE/pull/18097))
- tdarr: do not let a failed or slow updater block the service start [@MickLesk](https://github.com/MickLesk) ([#18100](https://github.com/community-scripts/ProxmoxVE/pull/18100))
- immich: install mise from its GitHub release, retry jellyfin-ffmpeg, default the ML prompt [@MickLesk](https://github.com/MickLesk) ([#18099](https://github.com/community-scripts/ProxmoxVE/pull/18099))
- Refactor: pimox-haos-vm [@MickLesk](https://github.com/MickLesk) ([#18077](https://github.com/community-scripts/ProxmoxVE/pull/18077))
### 💾 Core
- error output: report a failure inside a subshell once [@MickLesk](https://github.com/MickLesk) ([core#162](https://github.com/community-scripts/core/pull/162))
- Telemetry: explain and categorize by the command that failed [@MickLesk](https://github.com/MickLesk) ([core#166](https://github.com/community-scripts/core/pull/166))
- error-handler: report a handled silent failure only on its own line [@MickLesk](https://github.com/MickLesk) ([core#165](https://github.com/community-scripts/core/pull/165))
- VM silent: return the failure instead of exiting [@MickLesk](https://github.com/MickLesk) ([core#164](https://github.com/community-scripts/core/pull/164))
- error-handler: keep the start explanation and the final IP lookup from failing the run [@MickLesk](https://github.com/MickLesk) ([core#163](https://github.com/community-scripts/core/pull/163))
- error output: report a failure inside a subshell once [@MickLesk](https://github.com/MickLesk) ([core#162](https://github.com/community-scripts/core/pull/162))
- general: allow Composer as root in every script [@MickLesk](https://github.com/MickLesk) ([core#161](https://github.com/community-scripts/core/pull/161))
- lxc-updater: skip the resource check when the container cannot read its RAM [@MickLesk](https://github.com/MickLesk) ([core#160](https://github.com/community-scripts/core/pull/160))
- vm-core: let vm_timezone_default survive a host without /etc/timezone [@MickLesk](https://github.com/MickLesk) ([core#159](https://github.com/community-scripts/core/pull/159))
+4 -6
View File
@@ -65,12 +65,10 @@ EOF
msg_ok "Installed/upgraded Testing repo packages"
fi
if [[ ! -f /etc/apt/sources.list.d/mise.list ]]; then
msg_info "Installing Mise"
curl -fSs https://mise.jdx.dev/gpg-key.pub | tee /etc/apt/keyrings/mise-archive-keyring.pub 1>/dev/null
echo "deb [signed-by=/etc/apt/keyrings/mise-archive-keyring.pub arch=$(arch_resolve)] https://mise.jdx.dev/deb stable main" >/etc/apt/sources.list.d/mise.list
ensure_dependencies mise
msg_ok "Installed Mise"
if ! command -v mise >/dev/null 2>&1; then
MISE_ARCH="x64"
[[ "$(arch_resolve)" == "arm64" ]] && MISE_ARCH="arm64"
fetch_and_deploy_gh_release "mise" "jdx/mise" "singlefile" "latest" "/usr/local/bin" "mise-v*-linux-${MISE_ARCH}"
fi
STAGING_DIR=/opt/staging
+8
View File
@@ -31,6 +31,14 @@ function update_script() {
exit
fi
if [[ ! -f /etc/cron.d/invoiceshelf ]]; then
msg_info "Adding the Laravel scheduler"
cat <<'EOF' >/etc/cron.d/invoiceshelf
* * * * * www-data cd /opt/invoiceshelf && php artisan schedule:run >> /dev/null 2>&1
EOF
msg_ok "Added the Laravel scheduler"
fi
if check_for_gh_release "invoiceshelf" "InvoiceShelf/InvoiceShelf"; then
msg_info "Stopping Services"
systemctl stop caddy
+1 -1
View File
@@ -44,7 +44,7 @@ function update_script() {
$STD npm ci --legacy-peer-deps --ignore-scripts
$STD npm run build:icons
$STD npx prisma generate
NODE_OPTIONS="--max-old-space-size=4608" $STD npm run build
PROXCENTER_SKIP_TYPECHECK=1 NODE_OPTIONS="--max-old-space-size=3072" $STD npm run build
msg_ok "Built ProxCenter"
msg_info "Migrating Database"
+3 -1
View File
@@ -85,8 +85,10 @@ function update_script() {
rm -Rf /etc/apt/sources.list.d/zabbix.list
cd /tmp
ZABBIX_REPO_DIR="debian"
[[ "$ZABBIX_VERSION" == "7.0" && "$(arch_resolve)" == "arm64" ]] && ZABBIX_REPO_DIR="debian-arm64"
if [[ "$ZABBIX_VERSION" == "7.0" ]]; then
ZABBIX_DEB_URL="https://repo.zabbix.com/zabbix/${ZABBIX_VERSION}/debian/pool/main/z/zabbix-release/zabbix-release_latest_${ZABBIX_VERSION}+debian13_all.deb"
ZABBIX_DEB_URL="https://repo.zabbix.com/zabbix/${ZABBIX_VERSION}/${ZABBIX_REPO_DIR}/pool/main/z/zabbix-release/zabbix-release_latest_${ZABBIX_VERSION}+debian13_all.deb"
ZABBIX_DEB_FILE="zabbix-release_latest_${ZABBIX_VERSION}+debian13_all.deb"
else
ZABBIX_DEB_URL="https://repo.zabbix.com/zabbix/${ZABBIX_VERSION}/release/debian/pool/main/z/zabbix-release/zabbix-release_latest+debian13_all.deb"
+5
View File
@@ -12,6 +12,11 @@ setting_up_container
network_check
update_os
if is_debian && [[ "$(get_os_version_major)" -lt 13 ]]; then
msg_error "Apache Guacamole needs Debian 13: freerdp3-dev is not available on Debian 12."
exit 238
fi
msg_info "Installing Dependencies"
$STD apt install -y \
build-essential \
+1 -1
View File
@@ -110,7 +110,7 @@ export AUTOGRAPH_VERBOSITY=0
export GLOG_minloglevel=3
export GLOG_logtostderr=0
fetch_and_deploy_gh_release "frigate" "blakeblackshear/frigate" "tarball" "v0.18.0" "/opt/frigate"
fetch_and_deploy_gh_release "frigate" "blakeblackshear/frigate" "tarball" "v0.18.2" "/opt/frigate"
msg_info "Building Nginx"
$STD bash /opt/frigate/docker/main/build_nginx.sh
+2 -1
View File
@@ -36,7 +36,8 @@ msg_ok "Configured Service Environment"
confirm_external_installer "https://hermes-agent.nousresearch.com/" "https://hermes-agent.nousresearch.com/install.sh"
msg_info "Installing Hermes Agent"
curl -fsSL https://hermes-agent.nousresearch.com/install.sh -o /tmp/hermes-install.sh
curl_with_retry "https://hermes-agent.nousresearch.com/install.sh" /tmp/hermes-install.sh ||
curl_with_retry "https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh" /tmp/hermes-install.sh
$STD setsid --wait bash -c '
set -a; source /etc/default/hermes; set +a
export npm_config_yes=true
+5 -8
View File
@@ -25,7 +25,7 @@ if lscpu | grep -q 'GenuineIntel'; then
echo " 2) **NEW** Intel OpenVINO CPU or iGPU"
echo ""
read -r -p "${TAB3}Select machine-learning type [1]: " ML_TYPE
read -r -p "${TAB3}Select machine-learning type [1]: " ML_TYPE || true
ML_TYPE="${ML_TYPE:-1}"
if [[ "$ML_TYPE" == "2" ]]; then
touch ~/.openvino
@@ -110,7 +110,7 @@ setup_deb822_repo \
"https://repo.jellyfin.org/jellyfin_team.gpg.key" \
"https://repo.jellyfin.org/debian" \
"$(get_os_info codename)"
$STD apt install -y jellyfin-ffmpeg7
install_packages_with_retry jellyfin-ffmpeg7
ln -sf /usr/lib/jellyfin-ffmpeg/ffmpeg /usr/bin/ffmpeg
ln -sf /usr/lib/jellyfin-ffmpeg/ffprobe /usr/bin/ffprobe
@@ -124,12 +124,9 @@ if [[ "$CTTYPE" == "0" && -d /dev/dri ]]; then
fi
msg_ok "Dependencies Installed"
msg_info "Installing Mise"
curl -fSs https://mise.jdx.dev/gpg-key.pub | tee /etc/apt/keyrings/mise-archive-keyring.pub 1>/dev/null
echo "deb [signed-by=/etc/apt/keyrings/mise-archive-keyring.pub arch=$(arch_resolve)] https://mise.jdx.dev/deb stable main" >/etc/apt/sources.list.d/mise.list
apt_update_safe
$STD apt install -y mise
msg_ok "Installed Mise"
MISE_ARCH="x64"
[[ "$(arch_resolve)" == "arm64" ]] && MISE_ARCH="arm64"
fetch_and_deploy_gh_release "mise" "jdx/mise" "singlefile" "latest" "/usr/local/bin" "mise-v*-linux-${MISE_ARCH}"
msg_info "Configuring Debian Testing Repo"
if [[ -f /etc/apt/sources.list.d/debian.sources ]]; then
+3
View File
@@ -52,6 +52,9 @@ chown -R www-data:www-data /opt/invoiceshelf
chmod -R 775 storage bootstrap/cache
$STD php artisan migrate --force
$STD php artisan storage:link
cat <<'EOF' >/etc/cron.d/invoiceshelf
* * * * * www-data cd /opt/invoiceshelf && php artisan schedule:run >> /dev/null 2>&1
EOF
msg_ok "Set up InvoiceShelf"
msg_info "Configuring Caddy"
+4 -4
View File
@@ -37,10 +37,10 @@ fi
msg_ok "Installed Docker"
msg_info "Detecting latest Kasm Workspaces release"
KASM_URL=$(curl -s https://kasm.com/downloads \
KASM_URL=$(curl -s --max-time 30 https://kasm.com/downloads \
| grep -oP 'https://kasm-static-content\.s3\.amazonaws\.com/kasm_release_\d+\.\d+\.\d+-latest\.tar\.gz' \
| head -1)
KASM_VERSION=$(echo "$KASM_URL" | grep -oP '\d+\.\d+\.\d+(?=-latest)')
| head -1 || true)
KASM_VERSION=$(echo "$KASM_URL" | grep -oP '\d+\.\d+\.\d+(?=-latest)' || true)
# Fallback to predefined version if online lookup failed.
if [[ -z "$KASM_VERSION" ]] || [[ -z "$KASM_URL" ]]; then
@@ -63,7 +63,7 @@ curl_download "/opt/kasm_release_${KASM_VERSION}.tar.gz" "$KASM_URL"
cd /opt
tar -xf "kasm_release_${KASM_VERSION}.tar.gz"
chmod +x /opt/kasm_release/install.sh
printf 'y\ny\ny\n4\n' | bash /opt/kasm_release/install.sh --ignore-dep-failures >~/kasm-install.output 2>&1
bash /opt/kasm_release/install.sh --accept-eula --no-swap-check --no-check-disk --ignore-dep-failures >~/kasm-install.output 2>&1
awk '
/^Kasm UI Login Credentials$/ {capture=1}
capture {print}
-4
View File
@@ -57,10 +57,6 @@ else
}
fi
msg_ok "Installed Intel® Level Zero"
msg_info "Installing Intel® oneAPI Base Toolkit (Patience)"
$STD apt install -y --no-install-recommends intel-basekit-2024.1
msg_ok "Installed Intel® oneAPI Base Toolkit"
fi
msg_info "Installing Ollama (Patience)"
-4
View File
@@ -96,10 +96,6 @@ EOF
}
fi
msg_ok "Installed Intel® Level Zero"
msg_info "Installing Intel® oneAPI Base Toolkit (Patience)"
$STD apt install -y --no-install-recommends intel-basekit-2024.1 2>/dev/null || true
msg_ok "Installed Intel® oneAPI Base Toolkit"
fi
msg_info "Installing Ollama"
+5
View File
@@ -13,6 +13,11 @@ setting_up_container
network_check
update_os
if is_debian && [[ "$(get_os_version_major)" -lt 13 ]]; then
msg_error "Podman Home Assistant needs Debian 13: its Quadlet units require Podman 4.4 or newer."
exit 238
fi
PORTAINER_LATEST_VERSION=$(get_latest_github_release "portainer/portainer")
PORTAINER_AGENT_LATEST_VERSION=$(get_latest_github_release "portainer/agent")
+11 -4
View File
@@ -14,9 +14,11 @@ network_check
update_os
setup_deb_based() {
read -r -p "${TAB3}Enter PostgreSQL version (15/16/17/18): " ver
ver="${var_postgresql_version:-}"
[[ -n "$ver" ]] || read -r -p "${TAB3}Enter PostgreSQL version (15/16/17/18) [17]: " ver || true
ver="${ver:-17}"
[[ $ver =~ ^(15|16|17|18)$ ]] || {
echo "Invalid version"
msg_error "Invalid PostgreSQL version: ${ver} (expected 15, 16, 17 or 18)"
exit 64
}
PG_VERSION=$ver setup_postgresql
@@ -136,8 +138,13 @@ EOF
}
setup_alpine() {
read -r -p "${TAB3}Enter PostgreSQL version (15/16/17): " ver
[[ $ver =~ ^(15|16|17)$ ]] || { echo "Invalid version"; exit 64; }
ver="${var_postgresql_version:-}"
[[ -n "$ver" ]] || read -r -p "${TAB3}Enter PostgreSQL version (16/17/18) [17]: " ver || true
ver="${ver:-17}"
[[ $ver =~ ^(16|17|18)$ ]] || {
msg_error "Invalid PostgreSQL version: ${ver} (expected 16, 17 or 18)"
exit 64
}
msg_info "Installing PostgreSQL ${ver}"
$STD apk add --no-cache postgresql${ver} postgresql${ver}-contrib postgresql${ver}-openrc sudo
+1 -1
View File
@@ -24,7 +24,7 @@ cd /opt/proxcenter/frontend
$STD npm ci --legacy-peer-deps --ignore-scripts
$STD npm run build:icons
$STD npx prisma generate
NODE_OPTIONS="--max-old-space-size=4608" $STD npm run build
PROXCENTER_SKIP_TYPECHECK=1 NODE_OPTIONS="--max-old-space-size=3072" $STD npm run build
msg_ok "Built ProxCenter"
msg_info "Configuring ProxCenter"
+2 -1
View File
@@ -47,8 +47,9 @@ User=root
Group=root
Type=simple
WorkingDirectory=/opt/tdarr/Tdarr_Server
ExecStartPre=/opt/tdarr/Tdarr_Updater
ExecStartPre=-/opt/tdarr/Tdarr_Updater
ExecStart=/opt/tdarr/Tdarr_Server/Tdarr_Server
TimeoutStartSec=600
TimeoutStopSec=20
KillMode=process
Restart=on-failure
+5
View File
@@ -13,6 +13,11 @@ setting_up_container
network_check
update_os
if is_debian && [[ "$(get_os_version_major)" -lt 13 ]]; then
msg_error "UniFi OS Server needs Debian 13: its installer requires a newer Podman than Debian 12 ships."
exit 238
fi
if [[ "${CTTYPE:-1}" != "0" ]]; then
msg_error "UniFi OS Server requires a privileged LXC container."
msg_error "Recreate the container with unprivileged=0."
+3 -1
View File
@@ -32,8 +32,10 @@ esac
msg_info "Installing Zabbix $ZABBIX_VERSION"
cd /tmp
ZABBIX_REPO_DIR="debian"
[[ "$ZABBIX_VERSION" == "7.0" && "$(arch_resolve)" == "arm64" ]] && ZABBIX_REPO_DIR="debian-arm64"
if [[ "$ZABBIX_VERSION" == "7.0" ]]; then
ZABBIX_DEB_URL="https://repo.zabbix.com/zabbix/${ZABBIX_VERSION}/debian/pool/main/z/zabbix-release/zabbix-release_latest_${ZABBIX_VERSION}+debian13_all.deb"
ZABBIX_DEB_URL="https://repo.zabbix.com/zabbix/${ZABBIX_VERSION}/${ZABBIX_REPO_DIR}/pool/main/z/zabbix-release/zabbix-release_latest_${ZABBIX_VERSION}+debian13_all.deb"
ZABBIX_DEB_FILE="zabbix-release_latest_${ZABBIX_VERSION}+debian13_all.deb"
else
ZABBIX_DEB_URL="https://repo.zabbix.com/zabbix/${ZABBIX_VERSION}/release/debian/pool/main/z/zabbix-release/zabbix-release_latest+debian13_all.deb"
+97 -471
View File
@@ -1,508 +1,134 @@
#!/usr/bin/env bash
#!/usr/bin/env bash
# Copyright (c) 2021-2026 tteck | community-scripts ORG
# Author: tteck (tteckster) | MickLesk (CanbiZ)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Copyright (c) 2021-2026 tteck
# Author: tteck (tteckster)
# License: MIT
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
COMMUNITY_SCRIPTS_URL="${COMMUNITY_SCRIPTS_URL:-https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main}"
source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/pve/vm-core.func")
load_functions
source /dev/stdin <<<$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func)
APP="Home Assistant OS (ARM64)"
APP_TYPE="vm"
NSAPP="pimox-haos-vm"
var_os="homeassistantos"
var_version=" "
var_arm64="yes"
RANDOM_UUID="$(cat /proc/sys/kernel/random/uuid)"
GEN_MAC=02:$(openssl rand -hex 5 | awk '{print toupper($0)}' | sed 's/\(..\)/\1:/g; s/.$//')
METHOD=""
THIN="discard=on,ssd=1,"
function header_info {
cat <<"EOF"
____ _ __ ___
/ __ \(_) |/ /___ _ __
/ /_/ / / /|_/ / __ \| |/_/
/ ____/ / / / / /_/ /> <
__ __ /_/_ /_/_/ /_/\____/_/|_| __ ____ _____
/ / / /___ ____ ___ ___ / | __________(_)____/ /_____ _____ / /_ / __ \/ ___/
/ /_/ / __ \/ __ `__ \/ _ \ / /| | / ___/ ___/ / ___/ __/ __ `/ __ \/ __/ / / / /\__ \
/ __ / /_/ / / / / / / __/ / ___ |(__ |__ ) (__ ) /_/ /_/ / / / / /_ / /_/ /___/ /
/_/ /_/\____/_/ /_/ /_/\___/ /_/ |_/____/____/_/____/\__/\__,_/_/ /_/\__/ \____//____/
EOF
}
clear
header_info
echo -e "\n Loading..."
GEN_MAC=02:$(openssl rand -hex 5 | awk '{print toupper($0)}' | sed 's/\(..\)/\1:/g; s/.$//')
RANDOM_UUID="$(cat /proc/sys/kernel/random/uuid)"
VERSIONS=(stable beta dev)
METHOD=""
NSAPP="pimox-haos-vm"
var_os="pimox-haos"
DISK_SIZE="32G"
for version in "${VERSIONS[@]}"; do
eval "$version=$(curl -fsSL https://raw.githubusercontent.com/home-assistant/version/master/stable.json | grep '"ova"' | cut -d '"' -f 4)"
done
YW=$(echo "\033[33m")
BL=$(echo "\033[36m")
RD=$(echo "\033[01;31m")
BGN=$(echo "\033[4;92m")
GN=$(echo "\033[1;92m")
DGN=$(echo "\033[32m")
CL=$(echo "\033[m")
CL=$(echo "\033[m")
BOLD=$(echo "\033[1m")
BFR="\\r\\033[K"
HOLD=" "
TAB=" "
CM="${TAB}✔️${TAB}${CL}"
CROSS="${TAB}✖️${TAB}${CL}"
INFO="${TAB}💡${TAB}${CL}"
OS="${TAB}🖥️${TAB}${CL}"
CONTAINERTYPE="${TAB}📦${TAB}${CL}"
DISKSIZE="${TAB}💾${TAB}${CL}"
CPUCORE="${TAB}🧠${TAB}${CL}"
RAMSIZE="${TAB}🛠️${TAB}${CL}"
CONTAINERID="${TAB}🆔${TAB}${CL}"
HOSTNAME="${TAB}🏠${TAB}${CL}"
BRIDGE="${TAB}🌉${TAB}${CL}"
GATEWAY="${TAB}🌐${TAB}${CL}"
DEFAULT="${TAB}⚙️${TAB}${CL}"
MACADDRESS="${TAB}🔗${TAB}${CL}"
VLANTAG="${TAB}🏷️${TAB}${CL}"
CREATING="${TAB}🚀${TAB}${CL}"
ADVANCED="${TAB}🧩${TAB}${CL}"
CLOUD="${TAB}☁️${TAB}${CL}"
THIN="discard=on,ssd=1,"
set -e
set -Eeo pipefail
shopt -s inherit_errexit
trap 'error_handler $LINENO "$BASH_COMMAND"' ERR
trap cleanup EXIT
trap 'post_update_to_api "failed" "130"' SIGINT
trap 'post_update_to_api "failed" "143"' SIGTERM
trap 'post_update_to_api "failed" "130"; exit 130' SIGINT
trap 'post_update_to_api "failed" "143"; exit 143' SIGTERM
trap 'post_update_to_api "failed" "129"; exit 129' SIGHUP
function error_handler() {
local exit_code="$?"
local line_number="$1"
local command="$2"
local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}"
post_update_to_api "failed" "${exit_code}"
echo -e "\n$error_message\n"
cleanup_vmid
}
function get_valid_nextid() {
local try_id
try_id=$(pvesh get /cluster/nextid)
while true; do
if [ -f "/etc/pve/qemu-server/${try_id}.conf" ] || [ -f "/etc/pve/lxc/${try_id}.conf" ]; then
try_id=$((try_id + 1))
continue
fi
if lvs --noheadings -o lv_name | grep -qE "(^|[-_])${try_id}($|[-_])"; then
try_id=$((try_id + 1))
continue
fi
break
done
echo "$try_id"
}
function cleanup_vmid() {
if qm status $VMID &>/dev/null; then
qm stop $VMID &>/dev/null
qm destroy $VMID &>/dev/null
fi
}
function cleanup() {
local exit_code=$?
popd >/dev/null
if [[ "${POST_TO_API_DONE:-}" == "true" && "${POST_UPDATE_DONE:-}" != "true" ]]; then
if [[ $exit_code -eq 0 ]]; then
post_update_to_api "done" "none"
else
post_update_to_api "failed" "$exit_code"
fi
fi
rm -rf $TEMP_DIR
}
vm_require_arch arm64
TEMP_DIR=$(mktemp -d)
pushd $TEMP_DIR >/dev/null
if whiptail --backtitle "Proxmox VE Helper Scripts" --title "Pimox Homeassistant OS VM" --yesno "This will create a New Pimox Homeassistant OS VM. Proceed?" 10 58; then
:
else
header_info && echo -e "${CROSS}${RD}User exited script${CL}\n" && exit
fi
pushd "$TEMP_DIR" >/dev/null
function msg_info() {
local msg="$1"
echo -ne "${TAB}${YW}${HOLD}${msg}${HOLD}"
}
vm_preflight
vm_require_tools jq xz
function msg_ok() {
local msg="$1"
echo -e "${BFR}${CM}${GN}${msg}${CL}"
}
function msg_error() {
local msg="$1"
echo -e "${BFR}${CROSS}${RD}${msg}${CL}"
}
function check_root() {
if [[ "$(id -u)" -ne 0 || $(ps -o comm= -p $PPID) == "sudo" ]]; then
clear
msg_error "Please run this script as root."
echo -e "\nExiting..."
sleep 2
exit
fi
}
# This function checks the version of Proxmox Virtual Environment (PVE) and exits if the version is not supported.
# Supported: Proxmox VE 8.0.x – 8.9.x, 9.0 and 9.2
pve_check() {
local PVE_VER
PVE_VER="$(pveversion | awk -F'/' '{print $2}' | awk -F'-' '{print $1}')"
# Check for Proxmox VE 8.x: allow 8.0–8.9
if [[ "$PVE_VER" =~ ^8\.([0-9]+) ]]; then
local MINOR="${BASH_REMATCH[1]}"
if ((MINOR < 0 || MINOR > 9)); then
msg_error "This version of Proxmox VE is not supported."
msg_error "Supported: Proxmox VE version 8.0 – 8.9"
exit 105
fi
return 0
fi
# Check for Proxmox VE 9.x: allow 9.0 and 9.2
if [[ "$PVE_VER" =~ ^9\.([0-9]+) ]]; then
local MINOR="${BASH_REMATCH[1]}"
if ((MINOR < 0 || MINOR > 2)); then
msg_error "This version of Proxmox VE is not supported."
msg_error "Supported: Proxmox VE version 9.0 – 9.2"
exit 105
fi
return 0
fi
# All other unsupported versions
msg_error "This version of Proxmox VE is not supported."
msg_error "Supported versions: Proxmox VE 8.0 – 8.x or 9.0 – 9.2"
exit 105
}
function arch_check() {
if [ "$(dpkg --print-architecture)" != "amd64" ]; then
echo -e "\n ${INFO}${YWB}This script will not work with PiMox! \n"
echo -e "\n ${YWB}Visit https://github.com/asylumexp/Proxmox for ARM64 support. \n"
echo -e "Exiting..."
sleep 2
exit
fi
}
function ssh_check() {
if command -v pveversion >/dev/null 2>&1; then
if [ -n "${SSH_CLIENT:+x}" ]; then
if whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "SSH DETECTED" --yesno "It's suggested to use the Proxmox shell instead of SSH, since SSH can create issues while gathering variables. Would you like to proceed with using SSH?" 10 62; then
echo "you've been warned"
else
clear
exit
fi
fi
fi
}
function exit-script() {
clear
echo -e "\n${CROSS}${RD}User exited script${CL}\n"
exit
}
for channel in stable beta dev; do
channel_version="$(curl -fsSL "https://raw.githubusercontent.com/home-assistant/version/master/${channel}.json" | jq -er '.hassos["generic-aarch64"]')"
printf -v "${channel^^}" '%s' "$channel_version"
done
function default_settings() {
METHOD="default"
echo -e "${DGN}Using HAOS Version: ${BGN}${STABLE}${CL}"
BRANCH=${STABLE}
BRANCH="${VM_OS_VERSION:-$STABLE}"
VMID=$(get_valid_nextid)
echo -e "${DGN}Using Virtual Machine ID: ${BGN}$VMID${CL}"
echo -e "${DGN}Using Hostname: ${BGN}haos${STABLE}${CL}"
HN=haos${STABLE}
echo -e "${DGN}Allocated Cores: ${BGN}2${CL}"
vm_apply_machine_type "virt"
DISK_SIZE="32G"
DISK_CACHE=""
CPU_TYPE=""
HN="haos"
CORE_COUNT="2"
echo -e "${DGN}Allocated RAM: ${BGN}4096${CL}"
RAM_SIZE="4096"
echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}"
BRG="vmbr0"
echo -e "${DGN}Using MAC Address: ${BGN}$GEN_MAC${CL}"
MAC=$GEN_MAC
echo -e "${DGN}Using VLAN: ${BGN}Default${CL}"
MAC="$GEN_MAC"
VLAN=""
echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}"
MTU=""
echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}"
START_VM="yes"
echo -e "${BL}Creating a HAOS VM using the above default settings${CL}"
vm_echo_default_settings
}
function advanced_settings() {
METHOD="advanced"
BRANCH=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "HAOS VERSION" --radiolist "Choose Version" --cancel-button Exit-Script 10 58 3 \
"$STABLE" "Stable" ON \
"$BETA" "Beta" OFF \
"$DEV" "Dev" OFF \
3>&1 1>&2 2>&3)
exitstatus=$?
if [ $exitstatus = 0 ]; then echo -e "${DGN}Using HAOS Version: ${BGN}$BRANCH${CL}"; fi
[ -z "${VMID:-}" ] && VMID=$(get_valid_nextid)
VMID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Virtual Machine ID" 8 58 $VMID --title "VIRTUAL MACHINE ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
exitstatus=$?
if [ -z $VMID ]; then
VMID="$VMID"
echo -e "${DGN}Virtual Machine: ${BGN}$VMID${CL}"
if [[ "${VM_UNATTENDED:-0}" == "1" ]]; then
BRANCH="${VM_OS_VERSION:-$STABLE}"
elif vm_dialog radiolist "HAOS VERSION" "Choose Version" --cancel-button Exit-Script 12 58 3 \
"$STABLE" "Stable" ON "$BETA" "Beta" OFF "$DEV" "Dev" OFF; then
BRANCH="$VM_DIALOG_RESULT"
else
if echo "$USEDID" | egrep -q "$VMID"; then
echo -e "\n🚨 ${RD}ID $VMID is already in use${CL} \n"
echo -e "Exiting Script \n"
sleep 2
exit
else
if [ $exitstatus = 0 ]; then echo -e "${DGN}Virtual Machine ID: ${BGN}$VMID${CL}"; fi
fi
exit_script
fi
VM_NAME=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Hostname" 8 58 haos${BRANCH} --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
exitstatus=$?
if [ -z $VM_NAME ]; then
HN="haos${BRANCH}"
echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
else
if [ $exitstatus = 0 ]; then
HN=$(echo "${VM_NAME,,}" | tr -cs 'a-z0-9-' '-' | sed 's/^-//;s/-$//')
if [ "$HN" != "${VM_NAME,,}" ]; then
whiptail --backtitle "Proxmox VE Helper Scripts" --title "HOSTNAME ADJUSTED" --msgbox "Invalid characters detected. Hostname has been adjusted to:\n\n $HN" 10 58
fi
echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
fi
fi
while true; do
CORE_COUNT=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate CPU Cores" 8 58 2 --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
exitstatus=$?
if [ $exitstatus -ne 0 ]; then exit-script; fi
if [ -z "$CORE_COUNT" ]; then CORE_COUNT="2"; fi
if [[ "$CORE_COUNT" =~ ^[1-9][0-9]*$ ]]; then
echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
break
fi
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "CPU Cores must be a positive integer (e.g., 2)." 8 58
done
while true; do
RAM_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate RAM in MiB" 8 58 4096 --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
exitstatus=$?
if [ $exitstatus -ne 0 ]; then exit-script; fi
if [ -z "$RAM_SIZE" ]; then RAM_SIZE="4096"; fi
if [[ "$RAM_SIZE" =~ ^[1-9][0-9]*$ ]]; then
echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
break
fi
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "RAM Size must be a positive integer in MiB (e.g., 4096)." 8 58
done
BRG=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
exitstatus=$?
if [ -z $BRG ]; then
BRG="vmbr0"
echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
else
if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi
fi
while true; do
MAC1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a MAC Address" 8 58 $GEN_MAC --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
exitstatus=$?
if [ $exitstatus -ne 0 ]; then exit-script; fi
if [ -z "$MAC1" ]; then
MAC="$GEN_MAC"
echo -e "${DGN}Using MAC Address: ${BGN}$MAC${CL}"
break
fi
if [[ "$MAC1" =~ ^([0-9A-Fa-f]{2}:){5}[0-9A-Fa-f]{2}$ ]]; then
MAC="$MAC1"
echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
break
fi
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "Invalid MAC address format. Use XX:XX:XX:XX:XX:XX (e.g., AA:BB:CC:DD:EE:FF)." 8 58
done
while true; do
VLAN1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
exitstatus=$?
if [ $exitstatus -ne 0 ]; then exit-script; fi
if [ -z "$VLAN1" ]; then
VLAN1="Default"
VLAN=""
echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
break
fi
if [[ "$VLAN1" =~ ^[0-9]+$ ]] && [ "$VLAN1" -ge 1 ] && [ "$VLAN1" -le 4094 ]; then
VLAN=",tag=$VLAN1"
echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
break
fi
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "VLAN must be a number between 1 and 4094, or leave blank for default." 8 58
done
while true; do
MTU1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
exitstatus=$?
if [ $exitstatus -ne 0 ]; then exit-script; fi
if [ -z "$MTU1" ]; then
MTU1="Default"
MTU=""
echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}"
break
fi
if [[ "$MTU1" =~ ^[0-9]+$ ]] && [ "$MTU1" -ge 576 ] && [ "$MTU1" -le 65520 ]; then
MTU=",mtu=$MTU1"
echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}"
break
fi
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "MTU Size must be a number between 576 and 65520, or leave blank for default." 8 58
done
if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58); then
echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}"
START_VM="yes"
else
echo -e "${DGN}Start VM when completed: ${BGN}no${CL}"
START_VM="no"
fi
if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create HAOS ${BRANCH} VM?" --no-button Do-Over 10 58); then
echo -e "${RD}Creating a HAOS VM using the above advanced settings${CL}"
else
clear
header_info
echo -e "${RD}Using Advanced Settings${CL}"
vm_apply_machine_type "virt"
CPU_TYPE=""
vm_prompt_vmid "${VMID:-$(get_valid_nextid)}"
vm_prompt_disk_size "32G"
vm_prompt_disk_cache "none"
vm_prompt_hostname "haos"
vm_prompt_cpu_cores "2"
vm_prompt_ram "4096"
vm_prompt_bridge "vmbr0"
vm_prompt_mac "$GEN_MAC"
vm_prompt_vlan
vm_prompt_mtu
vm_prompt_keyboard
vm_prompt_verbose "no"
vm_prompt_start_vm "yes"
if ! vm_confirm_advanced_settings "Ready to create a HAOS VM?"; then
advanced_settings
fi
}
function START_SCRIPT() {
if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
clear
header_info
echo -e "${BL}Using Default Settings${CL}"
default_settings
else
clear
header_info
echo -e "${RD}Using Advanced Settings${CL}"
advanced_settings
fi
}
ARCH_CHECK
START_SCRIPT
vm_start_script "Use Default Settings?\n\nDefaults:\n• 2 CPU Cores\n• 4 GB RAM\n• 32 GB Disk" 13 58
var_version="$BRANCH"
post_to_api_vm
while read -r line; do
TAG=$(echo $line | awk '{print $1}')
TYPE=$(echo $line | awk '{printf "%-10s", $2}')
FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}')
ITEM=" Type: $TYPE Free: $FREE "
OFFSET=2
if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then
MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET))
vm_select_storage "$HN"
vm_define_disk_references 2
msg_info "Retrieving the Home Assistant OS ${BRANCH} image"
VM_RELEASE_SHA256=""
if [[ "$BRANCH" == "$DEV" ]]; then
URL="https://os-artifacts.home-assistant.io/${BRANCH}/haos_generic-aarch64-${BRANCH}.qcow2.xz"
else
if ! vm_release_asset github home-assistant/operating-system 'haos_generic-aarch64-.*\.qcow2\.xz$' "$BRANCH"; then
exit 1
fi
STORAGE_MENU+=("$TAG" "$ITEM" "OFF")
done < <(pvesm status -content images | awk 'NR>1')
if [ $((${#STORAGE_MENU[@]} / 3)) -eq 0 ]; then
echo -e "'Disk image' needs to be selected for at least one storage location."
die "Unable to detect valid storage location."
elif [ $((${#STORAGE_MENU[@]} / 3)) -eq 1 ]; then
STORAGE=${STORAGE_MENU[0]}
else
while [ -z "${STORAGE:+x}" ]; do
STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \
"Which storage pool would you like to use for the HAOS VM?\n\n" \
16 $(($MSG_MAX_LENGTH + 23)) 6 \
"${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3)
done
URL="$VM_RELEASE_URL"
var_version="$VM_RELEASE_VERSION"
fi
msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location."
msg_ok "Virtual Machine ID is ${CL}${BL}$VMID${CL}."
msg_info "Getting URL for Home Assistant ${BRANCH} Disk Image"
URL=https://github.com/home-assistant/operating-system/releases/download/${BRANCH}/haos_generic-aarch64-${BRANCH}.qcow2.xz
sleep 2
msg_ok "${CL}${BL}${URL}${CL}"
curl -f#SL -o "$(basename "$URL")" "$URL"
echo -en "\e[1A\e[0K"
FILE=$(basename $URL)
msg_ok "Downloaded ${CL}${BL}haos_generic-aarch64-${BRANCH}.qcow2.xz${CL}"
msg_info "Extracting Disk Image"
unxz $FILE
STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}')
case $STORAGE_TYPE in
nfs | dir)
DISK_EXT=".qcow2"
DISK_REF="$VMID/"
DISK_IMPORT="-format qcow2"
;;
*)
DISK_EXT=""
DISK_REF=""
DISK_IMPORT="-format raw"
;;
esac
for i in {0,1}; do
disk="DISK$i"
eval DISK${i}=vm-${VMID}-disk-${i}${DISK_EXT:-}
eval DISK${i}_REF=${STORAGE}:${DISK_REF:-}${!disk}
done
msg_ok "Extracted Disk Image"
CACHE_FILE="$(vm_image_cache_path "$URL")"
vm_fetch_image "$URL" "$CACHE_FILE" --cache --verify-xz --min-bytes $((5 * 1024 * 1024)) --sha256 "$VM_RELEASE_SHA256" || exit 115
vm_extract_image "$CACHE_FILE" "$TEMP_DIR/haos.qcow2"
vm_claim_vmid
msg_info "Creating HAOS VM"
qm create $VMID -bios ovmf -cores $CORE_COUNT -memory $RAM_SIZE -name $HN \
-net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci
pvesm alloc $STORAGE $VMID $DISK0 64M 1>&/dev/null
qm importdisk $VMID ${FILE%.*} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null
qm set $VMID \
-efidisk0 ${DISK0_REF},efitype=4m,size=64M \
-scsi0 ${DISK1_REF},size=32G >/dev/null
qm set $VMID \
-boot order=scsi0 >/dev/null
qm create "$VMID"${MACHINE} -agent 1 -bios ovmf -cores "$CORE_COUNT" -memory "$RAM_SIZE" -name "$HN" \
-net0 "virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU" -onboot 1 -ostype l26 -scsihw virtio-scsi-pci
vm_mark_created
vm_alloc_efi_disk "$DISK0"
vm_import_disk "$VMID" "$VM_IMAGE_FILE" "$STORAGE"
qm set "$VMID" -efidisk0 "${DISK0_REF},efitype=4m,size=64M" \
-scsi0 "${VM_IMPORTED_DISK},${DISK_CACHE}${THIN%,}" -boot order=scsi0 >/dev/null
vm_resize_disk
set_description
DESCRIPTION=$(
cat <<EOF
<div align='center'>
<a href='https://community-scripts.org' target='_blank' rel='noopener noreferrer'>
<img src='https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/images/logo-81x112.png' alt='Logo' style='width:81px;height:112px;'/>
</a>
<h2 style='font-size: 24px; margin: 20px 0;'>Homeassistant VM</h2>
<p style='margin: 16px 0;'>
<a href='https://ko-fi.com/community_scripts' target='_blank' rel='noopener noreferrer'>
<img src='https://img.shields.io/badge/&#x2615;-Buy us a coffee-blue' alt='spend Coffee' />
</a>
</p>
<span style='margin: 0 10px;'>
<i class="fa fa-github fa-fw" style="color: #f5f5f5;"></i>
<a href='https://github.com/community-scripts/ProxmoxVE' target='_blank' rel='noopener noreferrer' style='text-decoration: none; color: #00617f;'>GitHub</a>
</span>
<span style='margin: 0 10px;'>
<i class="fa fa-comments fa-fw" style="color: #f5f5f5;"></i>
<a href='https://github.com/community-scripts/ProxmoxVE/discussions' target='_blank' rel='noopener noreferrer' style='text-decoration: none; color: #00617f;'>Discussions</a>
</span>
<span style='margin: 0 10px;'>
<i class="fa fa-exclamation-circle fa-fw" style="color: #f5f5f5;"></i>
<a href='https://github.com/community-scripts/ProxmoxVE/issues' target='_blank' rel='noopener noreferrer' style='text-decoration: none; color: #00617f;'>Issues</a>
</span>
</div>
EOF
)
qm set $VMID -description "$DESCRIPTION" >/dev/null
if [ -n "$DISK_SIZE" ]; then
msg_info "Resizing disk to $DISK_SIZE GB"
qm resize $VMID scsi0 ${DISK_SIZE} >/dev/null
else
msg_info "Using default disk size of $DEFAULT_DISK_SIZE GB"
qm resize $VMID scsi0 ${DEFAULT_DISK_SIZE} >/dev/null
fi
msg_ok "Created HAOS VM ${CL}${BL}(${HN})"
if [ "$START_VM" == "yes" ]; then
msg_info "Starting Home Assistant OS VM"
qm start $VMID
msg_ok "Started Home Assistant OS VM"
fi
post_update_to_api "done" "none"
msg_ok "Completed successfully!\n"
vm_start_vm "Home Assistant OS VM"
vm_print_summary "Version=${var_version}" "Web UI=http://<VM-IP>:8123" "Console=Native HAOS CLI (ha)"
vm_next_steps \
"Wait several minutes for Home Assistant OS to finish first boot." \
"Open http://<VM-IP>:8123 and complete onboarding." \
"Use the Proxmox console for the native HAOS CLI (ha)." \
"Cloud-Init credentials do not apply to this appliance."
vm_finish "HAOS VM created. Complete onboarding at http://<VM-IP>:8123 after first boot."