Compare commits

..
Author SHA1 Message Date
MickLesk 671f0a347c proxcenter: skip the type check and lower the build heap
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 11:39:08 +02:00
76 changed files with 710 additions and 507 deletions

No files matched your search

+1 -32
View File
@@ -567,40 +567,9 @@ 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
- 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))
- 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))
+6 -4
View File
@@ -65,10 +65,12 @@ EOF
msg_ok "Installed/upgraded Testing repo packages"
fi
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}"
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"
fi
STAGING_DIR=/opt/staging
-8
View File
@@ -31,14 +31,6 @@ 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
+22 -54
View File
@@ -31,75 +31,42 @@ function update_script() {
exit
fi
NODE_VERSION="24" NODE_MODULE="corepack" setup_nodejs
NODE_VERSION="24" NODE_MODULE="corepack,yarn" setup_nodejs
if check_for_gl_release "storyteller" "storyteller-platform/storyteller" "" "" "web-v2"; then
msg_info "Stopping Service"
systemctl stop storyteller
msg_ok "Stopped Service"
ensure_dependencies cmake argon2 libcurl4t64 libxml2
fetch_and_deploy_gh_release "readium" "readium/cli" "prebuild" "v0.9.1" "/opt/readium" "readium_linux_$(arch_resolve "x86_64" "arm64").tar.gz"
create_backup /opt/storyteller/.env
CLEAN_INSTALL=1 CLEAN_INSTALL_KEEP="data" fetch_and_deploy_gl_release "storyteller" "storyteller-platform/storyteller" "tarball" "latest" "/opt/storyteller" "" "web-v2"
CLEAN_INSTALL=1 fetch_and_deploy_gl_release "storyteller" "storyteller-platform/storyteller" "tarball" "latest" "/opt/storyteller" "" "web-v2"
restore_backup
msg_info "Building Storyteller (Patience)"
msg_info "Rebuilding Storyteller"
cd /opt/storyteller
$STD corepack yarn install
export NODE_OPTIONS="--max-old-space-size=4096"
$STD corepack yarn install --network-timeout 600000
$STD gcc -g -fPIC -rdynamic -shared web/sqlite/uuid.c -o web/sqlite/uuid.c.so
export CI=1
export NODE_ENV=production
export NEXT_TELEMETRY_DISABLED=1
export SQLITE_NATIVE_BINDING=/opt/storyteller/node_modules/better-sqlite3/build/Release/better_sqlite3.node
$STD corepack yarn workspaces foreach -Rpt --from @storyteller-platform/web --exclude @storyteller-platform/eslint run build
STANDALONE=/opt/storyteller/applications/web/.next/standalone
WEB_DIR="$STANDALONE/applications/web"
mkdir -p "$WEB_DIR"/{public,.next/static,.next/cache,migrations,sqlite,scripts}
cp -rT applications/web/public "$WEB_DIR/public"
cp -rT applications/web/.next/static "$WEB_DIR/.next/static"
cp -rT applications/web/migrations "$WEB_DIR/migrations"
cp applications/web/sqlite/uuid.c.so "$WEB_DIR/sqlite/"
cp docker-scripts/reset-password.sh "$WEB_DIR/scripts/"
cp -r applications/web/work-dist applications/web/file-write-dist "$WEB_DIR/"
mkdir -p "$WEB_DIR/work-dist/@storyteller-platform/align/prebuilds"
cp -r "libraries/align/prebuilds/linux-$(arch_resolve "x64" "arm64")" "$WEB_DIR/work-dist/@storyteller-platform/align/prebuilds/"
cp node_modules/@echogarden/icu-segmentation-wasm/wasm/*.wasm "$WEB_DIR/work-dist/"
cp -rT node_modules/@parcel "$STANDALONE/node_modules/@parcel"
cp -rT node_modules/kuromoji "$STANDALONE/node_modules/kuromoji"
ln -sf /opt/storyteller/.env "$WEB_DIR/.env"
msg_ok "Built Storyteller"
msg_info "Updating Whisper"
WHISPER_VARIANT="linux-$(arch_resolve "x64" "arm64")-cpu"
$STD node /opt/storyteller/libraries/ghost-story/dist/cli/bin.js install binary "$WHISPER_VARIANT"
$STD node /opt/storyteller/libraries/ghost-story/dist/cli/bin.js install model tiny.en
if [[ "$WHISPER_VARIANT" == "linux-x64-cpu" ]]; then
$STD node /opt/storyteller/libraries/ghost-story/dist/cli/bin.js install binary linux-x64-cpu-legacy
mkdir -p /opt/storyteller/web/.next/standalone/web/.next/static
cp -rT /opt/storyteller/web/.next/static /opt/storyteller/web/.next/standalone/web/.next/static
if [[ -d /opt/storyteller/web/public ]]; then
mkdir -p /opt/storyteller/web/.next/standalone/web/public
cp -rT /opt/storyteller/web/public /opt/storyteller/web/.next/standalone/web/public
fi
msg_ok "Updated Whisper"
cat <<EOF >/etc/systemd/system/storyteller.service
[Unit]
Description=Storyteller
After=network.target
[Service]
Type=simple
User=root
WorkingDirectory=${WEB_DIR}
EnvironmentFile=/opt/storyteller/.env
Environment=SQLITE_NATIVE_BINDING=${STANDALONE}/node_modules/better-sqlite3/build/Release/better_sqlite3.node
Environment=ERROR_ALIGN_NATIVE_BINDING=${WEB_DIR}/work-dist/@storyteller-platform/align/
Environment=STORYTELLER_WORKER=worker.mjs
Environment=STORYTELLER_FILE_WRITE_WORKER=fileWriteWorker.mjs
ExecStart=/usr/bin/node --enable-source-maps server.js
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
mkdir -p /opt/storyteller/web/.next/standalone/web/migrations
cp -rT /opt/storyteller/web/migrations /opt/storyteller/web/.next/standalone/web/migrations
mkdir -p /opt/storyteller/web/.next/standalone/web/sqlite
cp -rT /opt/storyteller/web/sqlite /opt/storyteller/web/.next/standalone/web/sqlite
ln -sf /opt/storyteller/.env /opt/storyteller/web/.next/standalone/web/.env
msg_ok "Rebuilt Storyteller"
msg_info "Starting Service"
systemctl start storyteller
@@ -108,6 +75,7 @@ EOF
fi
exit
}
start
build_container
description
+1 -3
View File
@@ -85,10 +85,8 @@ 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}/${ZABBIX_REPO_DIR}/pool/main/z/zabbix-release/zabbix-release_latest_${ZABBIX_VERSION}+debian13_all.deb"
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_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,11 +12,6 @@ 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 \
+4 -6
View File
@@ -13,14 +13,12 @@ setting_up_container
network_check
update_os
version="${var_apache_tomcat_version:-}"
[[ -n "$version" ]] || read -r -p "${TAB3}Which Tomcat version would you like to install? (9, 10.1, 11): " version || true
jdk_version="${var_apache_tomcat_jdk_version:-}"
read -r -p "${TAB3}Which Tomcat version would you like to install? (9, 10.1, 11): " version
case $version in
9)
TOMCAT_VERSION="9"
echo "Which LTS Java version would you like to use? (8, 11, 17, 21): "
[[ -n "$jdk_version" ]] || read -r jdk_version || true
read -r jdk_version
case $jdk_version in
8 | 11 | 17 | 21)
JAVA_VERSION="$jdk_version" setup_java
@@ -34,7 +32,7 @@ case $version in
10 | 10.1)
TOMCAT_VERSION="10"
echo "Which LTS Java version would you like to use? (11, 17, 21): "
[[ -n "$jdk_version" ]] || read -r jdk_version || true
read -r jdk_version
case $jdk_version in
11 | 17 | 21)
JAVA_VERSION="$jdk_version" setup_java
@@ -48,7 +46,7 @@ case $version in
11)
TOMCAT_VERSION="11"
echo "Which LTS Java version would you like to use? (17, 21): "
[[ -n "$jdk_version" ]] || read -r jdk_version || true
read -r jdk_version
case $jdk_version in
17 | 21)
JAVA_VERSION="$jdk_version" setup_java
+1 -1
View File
@@ -18,7 +18,7 @@ $STD apt install -y aria2
msg_ok "Installed Aria2"
prompt="${var_aria2_ariang:-}"
[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add AriaNG? <y/N> " prompt || true
[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add AriaNG? <y/N> " prompt
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
msg_info "Installing Dependencies"
$STD apt install -y nginx
+1 -2
View File
@@ -47,8 +47,7 @@ Choose Asterisk version to install:
2) Latest LTS ($LTS_VERSION)
3) Latest Certified ($CERT_VERSION)
EOF
ASTERISK_CHOICE="${var_asterisk_version:-}"
[[ -n "$ASTERISK_CHOICE" ]] || read -rp "Enter choice [1-3]: " ASTERISK_CHOICE || true
read -rp "Enter choice [1-3]: " ASTERISK_CHOICE
CERTIFIED=0
case "$ASTERISK_CHOICE" in
+1 -4
View File
@@ -17,10 +17,9 @@ fetch_and_deploy_gh_release "authelia" "authelia/authelia" "binary"
MAX_ATTEMPTS=3
attempt=0
DOMAIN="${var_authelia_domain:-}"
while true; do
attempt=$((attempt + 1))
[[ -n "$DOMAIN" ]] || read -rp "${TAB3}Enter your domain or IP (ex. example.com or 192.168.1.100): " DOMAIN || true
read -rp "${TAB3}Enter your domain or IP (ex. example.com or 192.168.1.100): " DOMAIN
if [[ -z "$DOMAIN" ]]; then
if ((attempt >= MAX_ATTEMPTS)); then
DOMAIN="${LOCAL_IP:-localhost}"
@@ -41,13 +40,11 @@ while true; do
break
else
msg_warn "Invalid IP address!"
DOMAIN=""
fi
elif [[ "$DOMAIN" =~ ^[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*\.[a-zA-Z]{2,}$ ]]; then
break
else
msg_warn "Invalid domain format!"
DOMAIN=""
fi
done
msg_info "Setting Authelia up"
+1 -2
View File
@@ -15,8 +15,7 @@ update_os
fetch_and_deploy_gh_release "bichon" "rustmailer/bichon" "prebuild" "latest" "/opt/bichon" "bichon-*-$(arch_resolve "x86_64" "aarch64")-unknown-linux-gnu.tar.gz"
bichon_url="${var_bichon_url:-}"
[[ -n "$bichon_url" ]] || read -r -p "${TAB3}Enter the public URL for Bichon (e.g., https://bichon.yourdomain.com) or leave empty to use container IP: " bichon_url || true
read -r -p "${TAB3}Enter the public URL for Bichon (e.g., https://bichon.yourdomain.com) or leave empty to use container IP: " bichon_url
if [[ -z "$bichon_url" ]]; then
msg_info "No URL provided"
BICHON_PUBLIC_URL="http://$LOCAL_IP:15630"
+2 -4
View File
@@ -34,8 +34,7 @@ setup_deb_based() {
chmod +x bitmagnet
msg_ok "Configured bitmagnet"
tmdbapikey="${var_bitmagnet_tmdb_api_key:-}"
[[ -n "$tmdbapikey" ]] || read -r -p "${TAB3}Enter your TMDB API key if you have one: " tmdbapikey || true
read -r -p "${TAB3}Enter your TMDB API key if you have one: " tmdbapikey
cat <<EOF >/etc/bitmagnet.env
POSTGRES_HOST=localhost
@@ -100,8 +99,7 @@ setup_alpine() {
$STD su - postgres -c "psql -c 'CREATE DATABASE bitmagnet;'"
msg_ok "Built bitmagnet"
tmdbapikey="${var_bitmagnet_tmdb_api_key:-}"
[[ -n "$tmdbapikey" ]] || read -rp "${TAB3}Enter your TMDB API key if you have one: " tmdbapikey || true
read -rp "${TAB3}Enter your TMDB API key if you have one: " tmdbapikey
msg_info "Enabling bitmagnet Service"
cat <<EOF >/etc/init.d/bitmagnet
+1 -1
View File
@@ -25,7 +25,7 @@ $STD npm install
msg_ok "Installed ByteStash"
allowreg="${var_bytestash_registration:-}"
[[ -n "$allowreg" ]] || read -rp "${TAB3}Do you want to allow registration of multiple accounts? [y/n]: " allowreg || true
[[ -n "$allowreg" ]] || read -rp "${TAB3}Do you want to allow registration of multiple accounts? [y/n]: " allowreg
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/bytestash-backend.service
+2 -2
View File
@@ -18,7 +18,7 @@ setup_deb_based() {
systemctl enable -q --now caddy
prompt="${var_caddy_xcaddy:-}"
[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to install xCaddy Addon? <y/N> " prompt || true
[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to install xCaddy Addon? <y/N> " prompt
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
setup_go
fetch_and_deploy_gh_release "xcaddy" "caddyserver/xcaddy" "binary"
@@ -64,7 +64,7 @@ EOF
msg_ok "Installed Caddy"
prompt="${var_caddy_xcaddy:-}"
[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to install xCaddy Addon? <y/N> " prompt || true
[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to install xCaddy Addon? <y/N> " prompt
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
GO_VERSION="$(curl -fsSL https://go.dev/VERSION?m=text | head -1 | cut -c3-)" setup_go
fetch_and_deploy_gh_release "xcaddy" "caddyserver/xcaddy" "prebuild" "latest" "/opt/xcaddy" "xcaddy_*_linux_$(arch_resolve).tar.gz"
+8 -12
View File
@@ -13,18 +13,15 @@ setting_up_container
network_check
update_os
var_cf_api_token="${var_cf_api_token:-}"
[[ -n "$var_cf_api_token" ]] || read -rp "${TAB3}Enter the Cloudflare API token: " var_cf_api_token || true
[[ -n "$var_cf_api_token" ]] || { msg_error "No Cloudflare API token given; set var_cf_api_token or answer the prompt"; exit 64; }
var_cf_api_token="default"
read -rp "${TAB3}Enter the Cloudflare API token: " var_cf_api_token
var_cf_domains="${var_cf_domains:-}"
[[ -n "$var_cf_domains" ]] || read -rp "${TAB3}Enter the domains separated with a comma (*.example.org,www.example.org) " var_cf_domains || true
[[ -n "$var_cf_domains" ]] || { msg_error "No domains given; set var_cf_domains or answer the prompt"; exit 64; }
var_cf_domains="default"
read -rp "${TAB3}Enter the domains separated with a comma (*.example.org,www.example.org) " var_cf_domains
var_cf_proxied="false"
answer="${var_cloudflare_ddns_proxied:-}"
while true; do
[[ -n "$answer" ]] || read -rp "${TAB3}Proxied? (y/n): " answer || answer="n"
read -rp "${TAB3}Proxied? (y/n): " answer
case "$answer" in
[Yy]*)
var_cf_proxied="true"
@@ -34,13 +31,12 @@ while true; do
var_cf_proxied="false"
break
;;
*) echo "Please answer y or n."; answer="" ;;
*) echo "Please answer y or n." ;;
esac
done
var_cf_ip6_provider="none"
answer="${var_cloudflare_ddns_ipv6:-}"
while true; do
[[ -n "$answer" ]] || read -rp "${TAB3}Enable IPv6 support? (y/n): " answer || answer="n"
read -rp "${TAB3}Enable IPv6 support? (y/n): " answer
case "$answer" in
[Yy]*)
var_cf_ip6_provider="cloudflare.trace"
@@ -50,7 +46,7 @@ while true; do
var_cf_ip6_provider="none"
break
;;
*) echo "Please answer y or n."; answer="" ;;
*) echo "Please answer y or n." ;;
esac
done
msg_ok "Configured Application"
+1 -1
View File
@@ -33,7 +33,7 @@ msg_ok "Installed Cockpit"
# 45Drives only publishes amd64 packages
if [[ "$(arch_resolve)" != "arm64" ]]; then
prompt="${var_cockpit_45drives:-}"
[[ -n "$prompt" ]] || read -r -p "Would you like to install 45Drives' cockpit-file-sharing, cockpit-identities, and cockpit-navigator <y/N> " prompt || true
[[ -n "$prompt" ]] || read -r -p "Would you like to install 45Drives' cockpit-file-sharing, cockpit-identities, and cockpit-navigator <y/N> " prompt
fi
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
msg_info "Installing 45Drives' cockpit extensions"
+1 -2
View File
@@ -17,8 +17,7 @@ setup_hwaccel
echo
echo "${TAB3}Choose the GPU type for ComfyUI:"
echo "${TAB3}[1]-None [2]-NVIDIA [3]-AMD [4]-Intel"
gpu_choice="${var_comfyui_gpu_type:-}"
[[ -n "$gpu_choice" ]] || read -rp "${TAB3}Enter your choice [1-4] (default: 1): " gpu_choice || true
read -rp "${TAB3}Enter your choice [1-4] (default: 1): " gpu_choice
gpu_choice=${gpu_choice:-1}
case "$gpu_choice" in
1) comfyui_gpu_type="none" ;;
+1 -1
View File
@@ -20,7 +20,7 @@ msg_ok "Installed Dependencies"
NODE_VERSION="22" setup_nodejs
onlyoffice="${var_cryptpad_onlyoffice:-}"
[[ -n "$onlyoffice" ]] || read -rp "${TAB3}Install OnlyOffice components instead of CKEditor? (Y/N): " onlyoffice || true
[[ -n "$onlyoffice" ]] || read -rp "${TAB3}Install OnlyOffice components instead of CKEditor? (Y/N): " onlyoffice
fetch_and_deploy_gh_release "cryptpad" "cryptpad/cryptpad" "tarball"
msg_info "Setup CryptPad"
+15 -6
View File
@@ -15,8 +15,11 @@ update_os
setup_deb_based() {
setup_docker
socket_choice="${var_docker_socket:-}"
[[ -n "$socket_choice" ]] || read -r -p "${TAB3}Expose Docker TCP socket (insecure) ? [n = No, l = Local only (127.0.0.1), a = All interfaces (0.0.0.0)] <n/l/a>: " socket_choice || true
if [[ -n "${var_docker_socket:-}" ]]; then
socket_choice="$var_docker_socket"
else
read -r -p "${TAB3}Expose Docker TCP socket (insecure) ? [n = No, l = Local only (127.0.0.1), a = All interfaces (0.0.0.0)] <n/l/a>: " socket_choice
fi
case "${socket_choice,,}" in
l | local)
socket="tcp://127.0.0.1:2375"
@@ -67,8 +70,11 @@ setup_alpine() {
msg_ok "Installed Docker"
DOCKER_COMPOSE_LATEST_VERSION=$(get_latest_github_release "docker/compose" false)
prompt="${var_docker_compose:-}"
[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add Docker Compose? <y/N> " prompt || true
if [[ -n "${var_docker_compose:-}" ]]; then
prompt="$var_docker_compose"
else
read -r -p "${TAB3}Would you like to add Docker Compose? <y/N> " prompt
fi
if [[ "${prompt,,}" =~ ^(y|yes|true)$ ]]; then
msg_info "Installing Docker Compose $DOCKER_COMPOSE_LATEST_VERSION"
DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker}
@@ -77,8 +83,11 @@ setup_alpine() {
chmod +x "$DOCKER_CONFIG"/cli-plugins/docker-compose
msg_ok "Installed Docker Compose $DOCKER_COMPOSE_LATEST_VERSION"
fi
prompt="${var_docker_socket:-}"
[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to expose the Docker TCP socket? <y/N> " prompt || true
if [[ -n "${var_docker_socket:-}" ]]; then
prompt="$var_docker_socket"
else
read -r -p "${TAB3}Would you like to expose the Docker TCP socket? <y/N> " prompt
fi
case "${prompt,,}" in
y | yes | a | all) socket="tcp://0.0.0.0:2375" ;;
l | local) socket="tcp://127.0.0.1:2375" ;;
+2 -3
View File
@@ -26,9 +26,8 @@ $STD apt install -y \
nginx
msg_ok "Installed Dependencies"
var_project_name="${var_project_name:-}"
[[ -n "$var_project_name" ]] || read -r -p "${TAB3}Type the assembly name of the project: " var_project_name || true
[[ -n "$var_project_name" ]] || { msg_error "No assembly name given; set var_project_name or answer the prompt"; exit 64; }
var_project_name="default"
read -r -p "${TAB3}Type the assembly name of the project: " var_project_name
msg_info "Setting up FTP Server"
useradd ftpuser
+1 -3
View File
@@ -23,9 +23,7 @@ NODE_VERSION="22" NODE_MODULE="yarn" setup_nodejs
echo "${TAB3}It is important to choose the name for your server before you install Synapse, because it cannot be changed later."
echo "${TAB3}The server name determines the “domain” part of user-ids for users on your server: these will all be of the format @user:my.domain.name. It also determines how other matrix servers will reach yours for federation."
servername="${var_elementsynapse_server_name:-}"
[[ -n "$servername" ]] || read -r -p "${TAB3}Please enter the name for your server: " servername || true
[[ -n "$servername" ]] || { msg_error "No server name given; set var_elementsynapse_server_name or answer the prompt"; exit 64; }
read -p "${TAB3}Please enter the name for your server: " servername
msg_info "Installing Element Synapse"
setup_deb822_repo "matrix-org" \
+1 -1
View File
@@ -39,7 +39,7 @@ echo "$LATEST_VERSION" >~/.emqx
msg_ok "Installed EMQX"
prompt="${var_emqx_disable_mq:-}"
[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to disable the EMQX MQ feature? (reduces disk/CPU usage) <y/N> " prompt || true
[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to disable the EMQX MQ feature? (reduces disk/CPU usage) <y/N> " prompt
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
msg_info "Disabling EMQX MQ feature"
mkdir -p /etc/emqx
+3 -5
View File
@@ -45,8 +45,7 @@ $STD ln -svf /usr/bin/ffmpeg /usr/local/bin/ffmpeg
$STD ln -svf /usr/bin/ffprobe /usr/local/bin/ffprobe
$STD rm -rf /opt/fileflows/Server/runtimes/win-*
install_server="${var_fileflows_mode:-}"
[[ -n "$install_server" ]] || read -r -p "${TAB3}Do you want to install FileFlows Server or Agent? (S/A): " install_server || true
read -r -p "${TAB3}Do you want to install FileFlows Server or Agent? (S/A): " install_server
if [[ "$install_server" =~ ^[Ss]$ ]]; then
msg_info "Installing FileFlows Server"
@@ -55,10 +54,9 @@ if [[ "$install_server" =~ ^[Ss]$ ]]; then
systemctl enable -q --now fileflows
msg_ok "Installed FileFlows Server"
else
server_url="${var_fileflows_server_url:-}"
[[ -n "$server_url" ]] || read -r -p "${TAB3}Enter FileFlows Server URL (e.g. http://192.168.1.10:19200): " server_url || true
read -r -p "${TAB3}Enter FileFlows Server URL (e.g. http://192.168.1.10:19200): " server_url
while [[ -z "${server_url// /}" ]]; do
read -r -p "${TAB3}Enter FileFlows Server URL (e.g. http://192.168.1.10:19200): " server_url || { msg_error "No FileFlows Server URL given; set var_fileflows_server_url or answer the prompt"; exit 64; }
read -r -p "${TAB3}Enter FileFlows Server URL (e.g. http://192.168.1.10:19200): " server_url
done
msg_info "Installing FileFlows Agent"
cd /opt/fileflows/Agent
+4 -4
View File
@@ -15,12 +15,12 @@ update_os
setup_yq
if [[ -z "${var_forgejo_instance:-}" ]]; then
read -r -p "${TAB3}Forgejo Instance URL (e.g. https://codeberg.org): " var_forgejo_instance || true
read -r -p "${TAB3}Forgejo Instance URL (e.g. https://codeberg.org): " var_forgejo_instance
var_forgejo_instance="${var_forgejo_instance:-https://codeberg.org}"
fi
if [[ -z "${var_forgejo_runner_uuid:-}" ]]; then
read -r -p "${TAB3}Forgejo Runner UUID: " var_forgejo_runner_uuid || true
read -r -p "${TAB3}Forgejo Runner UUID: " var_forgejo_runner_uuid
fi
if [[ -z "${var_forgejo_runner_uuid:-}" ]]; then
@@ -29,7 +29,7 @@ if [[ -z "${var_forgejo_runner_uuid:-}" ]]; then
fi
if [[ -z "${var_forgejo_runner_token:-}" ]]; then
read -r -p "${TAB3}Forgejo Runner Token: " var_forgejo_runner_token || true
read -r -p "${TAB3}Forgejo Runner Token: " var_forgejo_runner_token
fi
if [[ -z "${var_forgejo_runner_token:-}" ]]; then
@@ -39,7 +39,7 @@ fi
DEFAULT_RUNNER_LABELS="linux-amd64:docker://node:22-bookworm"
if [[ -z "${var_runner_labels:-}" ]]; then
read -r -p "${TAB3}Additional runner labels (comma-separated, or leave blank for default only): " var_runner_labels || true
read -r -p "${TAB3}Additional runner labels (comma-separated, or leave blank for default only): " var_runner_labels
fi
if [[ -n "${var_runner_labels:-}" ]]; then
RUNNER_LABELS="${DEFAULT_RUNNER_LABELS},${var_runner_labels}"
+2 -4
View File
@@ -51,10 +51,8 @@ echo -e ""
msg_custom "🪙" "$YW" "CoinGecko API keys are optional but provide better cryptocurrency data."
msg_custom "🪙" "$YW" "You can skip this and add them later by editing /opt/ghostfolio/.env"
echo -e ""
COINGECKO_DEMO_KEY="${var_ghostfolio_coingecko_demo_key:-}"
[[ -n "$COINGECKO_DEMO_KEY" ]] || read -rp "${TAB3}CoinGecko Demo API key (press Enter to skip): " COINGECKO_DEMO_KEY || true
COINGECKO_PRO_KEY="${var_ghostfolio_coingecko_pro_key:-}"
[[ -n "$COINGECKO_PRO_KEY" ]] || read -rp "${TAB3}CoinGecko Pro API key (press Enter to skip): " COINGECKO_PRO_KEY || true
read -rp "${TAB3}CoinGecko Demo API key (press Enter to skip): " COINGECKO_DEMO_KEY
read -rp "${TAB3}CoinGecko Pro API key (press Enter to skip): " COINGECKO_PRO_KEY
msg_info "Setting up Environment"
cat <<EOF >/opt/ghostfolio/.env
+1 -1
View File
@@ -16,7 +16,7 @@ update_os
fetch_and_deploy_gh_release "headscale" "juanfont/headscale" "binary"
prompt="${var_headscale_admin:-}"
[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add headscale-admin UI? <y/N> " prompt || true
[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add headscale-admin UI? <y/N> " prompt
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
fetch_and_deploy_gh_release "headscale-admin" "GoodiesHQ/headscale-admin" "prebuild" "latest" "/opt/headscale-admin" "admin.zip"
+1 -2
View File
@@ -36,8 +36,7 @@ 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_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
curl -fsSL https://hermes-agent.nousresearch.com/install.sh -o /tmp/hermes-install.sh
$STD setsid --wait bash -c '
set -a; source /etc/default/hermes; set +a
export npm_config_yes=true
+8 -5
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 || true
read -r -p "${TAB3}Select machine-learning type [1]: " ML_TYPE
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)"
install_packages_with_retry jellyfin-ffmpeg7
$STD apt install -y jellyfin-ffmpeg7
ln -sf /usr/lib/jellyfin-ffmpeg/ffmpeg /usr/bin/ffmpeg
ln -sf /usr/lib/jellyfin-ffmpeg/ffprobe /usr/bin/ffprobe
@@ -124,9 +124,12 @@ if [[ "$CTTYPE" == "0" && -d /dev/dri ]]; then
fi
msg_ok "Dependencies Installed"
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 "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"
msg_info "Configuring Debian Testing Repo"
if [[ -f /etc/apt/sources.list.d/debian.sources ]]; then
+2 -3
View File
@@ -21,8 +21,7 @@ setup_deb822_repo \
"stable"
msg_ok "Set up InfluxDB Repository"
prompt="${var_influxdb_version:-}"
[[ -n "$prompt" ]] || read -r -p "${TAB3}Which version of InfluxDB to install? (1, 2 or 3) " prompt || true
read -r -p "${TAB3}Which version of InfluxDB to install? (1, 2 or 3) " prompt
if [[ $prompt == "3" ]]; then
INFLUX="3"
elif [[ $prompt == "2" ]]; then
@@ -52,7 +51,7 @@ fi
msg_ok "Installed InfluxDB"
prompt="${var_influxdb_telegraf:-}"
[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add Telegraf? <y/N> " prompt || true
[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add Telegraf? <y/N> " prompt
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
msg_info "Installing Telegraf"
$STD apt install -y telegraf
-3
View File
@@ -52,9 +52,6 @@ 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 --max-time 30 https://kasm.com/downloads \
KASM_URL=$(curl -s https://kasm.com/downloads \
| grep -oP 'https://kasm-static-content\.s3\.amazonaws\.com/kasm_release_\d+\.\d+\.\d+-latest\.tar\.gz' \
| head -1 || true)
KASM_VERSION=$(echo "$KASM_URL" | grep -oP '\d+\.\d+\.\d+(?=-latest)' || true)
| head -1)
KASM_VERSION=$(echo "$KASM_URL" | grep -oP '\d+\.\d+\.\d+(?=-latest)')
# 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
bash /opt/kasm_release/install.sh --accept-eula --no-swap-check --no-check-disk --ignore-dep-failures >~/kasm-install.output 2>&1
printf 'y\ny\ny\n4\n' | bash /opt/kasm_release/install.sh --ignore-dep-failures >~/kasm-install.output 2>&1
awk '
/^Kasm UI Login Credentials$/ {capture=1}
capture {print}
+3 -9
View File
@@ -28,15 +28,9 @@ mkdir -p config/assets
cp config/config.yml.template config/config.yml
msg_ok "Setup Kometa"
TMDBKEY="${var_kometa_tmdb_key:-}"
[[ -n "$TMDBKEY" ]] || read -r -p "${TAB3}Enter your TMDb API key: " TMDBKEY || true
[[ -n "$TMDBKEY" ]] || { msg_error "No TMDb API key given; set var_kometa_tmdb_key or answer the prompt"; exit 64; }
PLEXURL="${var_kometa_plex_url:-}"
[[ -n "$PLEXURL" ]] || read -r -p "${TAB3}Enter your Plex URL: " PLEXURL || true
[[ -n "$PLEXURL" ]] || { msg_error "No Plex URL given; set var_kometa_plex_url or answer the prompt"; exit 64; }
PLEXTOKEN="${var_kometa_plex_token:-}"
[[ -n "$PLEXTOKEN" ]] || read -r -p "${TAB3}Enter your Plex token: " PLEXTOKEN || true
[[ -n "$PLEXTOKEN" ]] || { msg_error "No Plex token given; set var_kometa_plex_token or answer the prompt"; exit 64; }
read -r -p "${TAB3}Enter your TMDb API key: " TMDBKEY
read -r -p "${TAB3}Enter your Plex URL: " PLEXURL
read -r -p "${TAB3}Enter your Plex token: " PLEXTOKEN
sed -i '/^plex:/,/^[^ ]/{s| url:.*| url: '"$PLEXURL"'|}' /opt/kometa/config/config.yml
sed -i '/^plex:/,/^[^ ]/{s| token:.*| token: '"$PLEXTOKEN"'|}' /opt/kometa/config/config.yml
sed -i '/^tmdb:/,/^[^ ]/{s| apikey:.*| apikey: '"$TMDBKEY"'|}' /opt/kometa/config/config.yml
+2 -5
View File
@@ -15,8 +15,7 @@ update_os
echo "${TAB3}How would you like to handle SSL termination?"
echo "${TAB3}[i]-Internal (self-signed SSL Certificate) [e]-External (use your own reverse proxy)"
ssl_choice="${var_kutt_ssl:-}"
[[ -n "$ssl_choice" ]] || read -rp "${TAB3}Enter your choice <i/e> (default: i): " ssl_choice || true
read -rp "${TAB3}Enter your choice <i/e> (default: i): " ssl_choice
ssl_choice=${ssl_choice:-i}
case "${ssl_choice,,}" in
i)
@@ -33,9 +32,7 @@ EOF
msg_ok "Configured Caddy"
;;
e)
custom_host="${var_kutt_hostname:-}"
[[ -n "$custom_host" ]] || read -r -p "${TAB3}Enter the hostname you want to use for Kutt (eg. kutt.example.com): " custom_host || true
[[ -n "$custom_host" ]] || { msg_error "No hostname given; set var_kutt_hostname or answer the prompt"; exit 64; }
read -r -p "${TAB3}Enter the hostname you want to use for Kutt (eg. kutt.example.com): " custom_host
if [[ "$custom_host" ]]; then
DEFAULT_HOST="$custom_host"
fi
+3 -3
View File
@@ -29,12 +29,12 @@ rm -f /tmp/LanguageTool-stable.zip
msg_ok "Setup LanguageTool"
ngram_dir=""
lang_code="${var_languagetool_ngram_lang:-}"
lang_code=""
max_attempts=3
attempt=0
while [[ $attempt -lt $max_attempts ]]; do
[[ -n "$lang_code" ]] || read -r -p "${TAB3}Enter language code (en, de, es, fr, nl) to download ngrams or press ENTER to skip: " lang_code || lang_code=""
read -r -p "${TAB3}Enter language code (en, de, es, fr, nl) to download ngrams or press ENTER to skip: " lang_code
if [[ -z "$lang_code" ]]; then
break
@@ -43,11 +43,11 @@ while [[ $attempt -lt $max_attempts ]]; do
if [[ "$lang_code" =~ [[:space:]] ]]; then
((attempt++))
remaining=$((max_attempts - attempt))
lang_code=""
if [[ $remaining -gt 0 ]]; then
msg_error "Please enter only ONE language code. You have $remaining attempt(s) remaining."
else
msg_error "Maximum attempts reached. Continuing without ngrams."
lang_code=""
fi
continue
fi
+1 -1
View File
@@ -25,7 +25,7 @@ RUST_CRATES="monolith" setup_rust
PG_DB_NAME="linkwardendb" PG_DB_USER="linkwarden" setup_postgresql_db
prompt="${var_linkwarden_adminer:-}"
[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add Adminer? <y/N> " prompt || true
[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add Adminer? <y/N> " prompt
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
setup_adminer
fi
+2 -2
View File
@@ -22,7 +22,7 @@ setup_deb_based() {
msg_ok "Setup MariaDB"
prompt="${var_mariadb_phpmyadmin:-}"
[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add PhpMyAdmin? <y/N> " prompt || true
[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add PhpMyAdmin? <y/N> " prompt
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
msg_info "Installing phpMyAdmin"
$STD apt install -y \
@@ -60,7 +60,7 @@ setup_alpine() {
msg_ok "MariaDB Configured"
prompt="${var_mariadb_adminer:-}"
[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to install Adminer with lighttpd? <y/N>: " prompt || true
[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to install Adminer with lighttpd? <y/N>: " prompt
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
msg_info "Installing Adminer and dependencies"
$STD apk add --no-cache \
+1 -3
View File
@@ -13,9 +13,7 @@ setting_up_container
network_check
update_os
admin_email="${var_mediamanager_admin_email:-}"
[[ -n "$admin_email" ]] || read -r -p "${TAB3}Enter the email address of your first admin user: " admin_email || true
[[ -n "$admin_email" ]] || { msg_error "No admin e-mail given; set var_mediamanager_admin_email or answer the prompt"; exit 64; }
read -r -p "${TAB3}Enter the email address of your first admin user: " admin_email
if [[ "$admin_email" ]]; then
EMAIL="$admin_email"
fi
+1 -1
View File
@@ -16,7 +16,7 @@ update_os
MEILISEARCH_BIND="0.0.0.0:7700" setup_meilisearch
prompt="${var_meilisearch_ui:-}"
[[ -n "$prompt" ]] || read -r -p "${TAB3}Do you want add meilisearch-ui? [y/n]: " prompt || true
[[ -n "$prompt" ]] || read -r -p "${TAB3}Do you want add meilisearch-ui? [y/n]: " prompt
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
NODE_VERSION="22" NODE_MODULE="pnpm@latest" setup_nodejs
fetch_and_deploy_gh_release "meilisearch-ui" "riccox/meilisearch-ui" "tarball"
+2 -3
View File
@@ -16,9 +16,8 @@ update_os
if [[ "$(arch_resolve)" == "arm64" ]]; then
MONGO_VERSION="8.0" setup_mongodb
else
install_mongodb_8="${var_mongodb_8:-}"
[[ -n "$install_mongodb_8" ]] || read -r -p "${TAB3}Do you want to install MongoDB 8.0 instead of 7.0? [y/N]: " install_mongodb_8 || true
if [[ "$install_mongodb_8" =~ ^[Yy]([Ee][Ss])?$ ]]; then
read -p "${TAB3}Do you want to install MongoDB 8.0 instead of 7.0? [y/N]: " install_mongodb_8
if [[ "$install_mongodb_8" =~ ^[Yy]$ ]]; then
MONGO_VERSION="8.0" setup_mongodb
else
MONGO_VERSION="7.0" setup_mongodb
+2 -4
View File
@@ -21,8 +21,7 @@ msg_ok "Installed Dependencies"
RELEASE_REPO="mysql-8.0"
RELEASE_AUTH="mysql_native_password"
prompt="${var_mysql_lts:-}"
[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to install the MySQL 8.4 LTS release instead of MySQL 8.0 (bug fix track; EOL April-2026)? <y/N> " prompt || true
read -r -p "${TAB3}Would you like to install the MySQL 8.4 LTS release instead of MySQL 8.0 (bug fix track; EOL April-2026)? <y/N> " prompt
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
RELEASE_REPO="mysql-8.4-lts"
RELEASE_AUTH="caching_sha2_password"
@@ -62,8 +61,7 @@ echo -e "MySQL user: root" >>~/mysql.creds
echo -e "MySQL password: $ADMIN_PASS" >>~/mysql.creds
msg_ok "MySQL Server configured"
prompt="${var_mysql_phpmyadmin:-}"
[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add PhpMyAdmin? <y/N> " prompt || true
read -r -p "${TAB3}Would you like to add PhpMyAdmin? <y/N> " prompt
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/addon/phpmyadmin.sh)"
fi
+5 -10
View File
@@ -36,8 +36,7 @@ echo " 1) NetBird Managed (default) - Use NetBird's managed service"
echo " 2) Self-Hosted - Use your own NetBird management server"
echo ""
DEPLOYMENT_TYPE="${var_netbird_deployment:-}"
[[ -n "$DEPLOYMENT_TYPE" ]] || read -r -p "${TAB3}Select deployment type [1]: " DEPLOYMENT_TYPE || true
read -r -p "${TAB3}Select deployment type [1]: " DEPLOYMENT_TYPE
DEPLOYMENT_TYPE="${DEPLOYMENT_TYPE:-1}"
NETBIRD_MGMT_URL=""
@@ -52,8 +51,7 @@ case "$DEPLOYMENT_TYPE" in
echo "Enter your NetBird management server URL."
echo "Example: https://management.example.com"
echo ""
NETBIRD_MGMT_URL="${var_netbird_mgmt_url:-}"
[[ -n "$NETBIRD_MGMT_URL" ]] || read -r -p "Management URL: " NETBIRD_MGMT_URL || true
read -r -p "Management URL: " NETBIRD_MGMT_URL
if [[ -z "$NETBIRD_MGMT_URL" ]]; then
msg_warn "No management URL provided. Run 'netbird up --management-url <url>' to connect."
@@ -83,8 +81,7 @@ else
fi
echo ""
AUTH_METHOD="${var_netbird_auth:-}"
[[ -n "$AUTH_METHOD" ]] || read -r -p "Select authentication method [1]: " AUTH_METHOD || true
read -r -p "Select authentication method [1]: " AUTH_METHOD
AUTH_METHOD="${AUTH_METHOD:-1}"
if [[ "$DEPLOYMENT_TYPE" == "1" ]]; then
@@ -93,8 +90,7 @@ if [[ "$DEPLOYMENT_TYPE" == "1" ]]; then
echo ""
echo "Enter your NetBird setup key from the NetBird dashboard."
echo ""
NETBIRD_SETUP_KEY="${var_netbird_setup_key:-}"
[[ -n "$NETBIRD_SETUP_KEY" ]] || read -r -p "Setup key: " NETBIRD_SETUP_KEY || true
read -r -p "Setup key: " NETBIRD_SETUP_KEY
echo ""
if [[ -z "$NETBIRD_SETUP_KEY" ]]; then
@@ -140,8 +136,7 @@ else
echo ""
echo "Enter your NetBird setup key from the NetBird dashboard."
echo ""
NETBIRD_SETUP_KEY="${var_netbird_setup_key:-}"
[[ -n "$NETBIRD_SETUP_KEY" ]] || read -r -p "Setup key: " NETBIRD_SETUP_KEY || true
read -r -p "Setup key: " NETBIRD_SETUP_KEY
echo ""
if [[ -z "$NETBIRD_SETUP_KEY" ]]; then
+8 -7
View File
@@ -16,15 +16,16 @@ update_os
fetch_and_deploy_gh_release "newt" "fosrl/newt" "singlefile" "latest" "/opt/newt" "newt_linux_$(arch_resolve)"
ln -sf /opt/newt/newt /usr/local/bin/newt
NEWT_ID="${NEWT_ID:-${var_newt_id:-}}"
[[ -n "$NEWT_ID" ]] || read -rp "Newt ID (from your Pangolin dashboard): " NEWT_ID || true
NEWT_SECRET="${NEWT_SECRET:-${var_newt_secret:-}}"
if [[ -z "$NEWT_SECRET" ]]; then
read -rsp "Newt Secret: " NEWT_SECRET || true
if [[ -z "${NEWT_ID:-}" ]]; then
read -rp "Newt ID (from your Pangolin dashboard): " NEWT_ID
fi
if [[ -z "${NEWT_SECRET:-}" ]]; then
read -rsp "Newt Secret: " NEWT_SECRET
echo
fi
PANGOLIN_ENDPOINT="${PANGOLIN_ENDPOINT:-${var_newt_endpoint:-}}"
[[ -n "$PANGOLIN_ENDPOINT" ]] || read -rp "Pangolin endpoint (e.g. https://pangolin.example.com): " PANGOLIN_ENDPOINT || true
if [[ -z "${PANGOLIN_ENDPOINT:-}" ]]; then
read -rp "Pangolin endpoint (e.g. https://pangolin.example.com): " PANGOLIN_ENDPOINT
fi
if [[ -z "$NEWT_ID" || -z "$NEWT_SECRET" || -z "$PANGOLIN_ENDPOINT" ]]; then
msg_error "Newt ID, Secret and Endpoint are all required. Aborting."
+2 -6
View File
@@ -38,14 +38,12 @@ curl -fsSL "https://raw.githubusercontent.com/ZoeyVid/NPMplus/refs/heads/develop
msg_ok "Fetched NPMplus"
attempts=0
TZ_INPUT="${var_npmplus_tz:-}"
while true; do
[[ -n "$TZ_INPUT" ]] || read -r -p "${TAB3}Enter your TZ Identifier (e.g., Europe/Berlin): " TZ_INPUT || { msg_error "No TZ identifier given; set var_npmplus_tz or answer the prompt"; exit 64; }
read -r -p "${TAB3}Enter your TZ Identifier (e.g., Europe/Berlin): " TZ_INPUT
if validate_tz "$TZ_INPUT"; then
break
fi
msg_error "Invalid timezone! Please enter a valid TZ identifier."
TZ_INPUT=""
attempts=$((attempts + 1))
if [[ "$attempts" -ge 3 ]]; then
@@ -54,9 +52,7 @@ while true; do
fi
done
ACME_EMAIL_INPUT="${var_npmplus_acme_email:-}"
[[ -n "$ACME_EMAIL_INPUT" ]] || read -r -p "${TAB3}Enter your ACME Email: " ACME_EMAIL_INPUT || true
[[ -n "$ACME_EMAIL_INPUT" ]] || { msg_error "No ACME e-mail given; set var_npmplus_acme_email or answer the prompt"; exit 64; }
read -r -p "${TAB3}Enter your ACME Email: " ACME_EMAIL_INPUT
yq -i "
.services.npmplus.environment |=
+4
View File
@@ -57,6 +57,10 @@ 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)"
+1 -5
View File
@@ -17,23 +17,19 @@ MAX_ATTEMPTS=3
servers=("opencloud" "collabora" "wopi")
attempt=0
for server in "${servers[@]}"; do
fqdn_var="var_opencloud_${server}_fqdn"
fqdn="${!fqdn_var:-}"
until ((attempt >= MAX_ATTEMPTS)); do
attempt=$((attempt + 1))
[[ -n "$fqdn" ]] || read -rp "${TAB3}Enter the FQDN of your ${server^} server (ATTEMPT $attempt/$MAX_ATTEMPTS) (eg $server.domain.tld): " fqdn || { msg_error "No ${server^} FQDN given; set ${fqdn_var} or answer the prompt"; exit 64; }
read -rp "${TAB3}Enter the FQDN of your ${server^} server (ATTEMPT $attempt/$MAX_ATTEMPTS) (eg $server.domain.tld): " fqdn
if [[ -z "$fqdn" ]]; then
msg_warn "Domain cannot be empty!"
elif [[ "$fqdn" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}$ ]]; then
msg_warn "IP address not allowed! Please use a FQDN"
fqdn=""
elif [[ "$fqdn" =~ ^[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*\.[a-zA-Z]{2,}$ ]]; then
export ${server^^}_FQDN="$fqdn"
attempt=0
break
else
msg_warn "Invalid domain format!"
fqdn=""
fi
done
if ((attempt >= MAX_ATTEMPTS)); then
+6 -2
View File
@@ -27,7 +27,7 @@ PYTHON_VERSION="3.12" setup_uv
OTEL_ARGS=()
prompt="${var_openwebui_otel:-}"
[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to install OpenTelemetry instrumentation packages (requires manual .env configuration)? <y/N> " prompt || true
[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to install OpenTelemetry instrumentation packages (requires manual .env configuration)? <y/N> " prompt
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
for pkg in \
opentelemetry-api \
@@ -57,7 +57,7 @@ done
msg_ok "Installed Open WebUI"
prompt="${var_openwebui_ollama:-}"
[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add Ollama? <y/N> " prompt || true
[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add Ollama? <y/N> " prompt
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
if [[ "$(arch_resolve)" == "amd64" ]]; then
msg_info "Setting up Intel® Repositories"
@@ -96,6 +96,10 @@ 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 -10
View File
@@ -27,22 +27,17 @@ apt_update_safe
$STD apt install -y openziti-controller openziti-console </dev/null
msg_ok "Installed openziti"
prompt="${var_openziti_controller_autoconfig:-}"
[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to go through the auto configuration now? <y/N>" prompt || true
read -r -p "${TAB3}Would you like to go through the auto configuration now? <y/N>" prompt
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
GEN_FQDN="controller.${LOCAL_IP}.sslip.io"
ZITI_CTRL_ADVERTISED_ADDRESS="${var_openziti_controller_fqdn:-}"
[[ -n "$ZITI_CTRL_ADVERTISED_ADDRESS" ]] || read -r -p "${TAB3}Please enter the controller FQDN [${GEN_FQDN}]: " ZITI_CTRL_ADVERTISED_ADDRESS || true
read -r -p "${TAB3}Please enter the controller FQDN [${GEN_FQDN}]: " ZITI_CTRL_ADVERTISED_ADDRESS
ZITI_CTRL_ADVERTISED_ADDRESS=${ZITI_CTRL_ADVERTISED_ADDRESS:-$GEN_FQDN}
ZITI_CTRL_ADVERTISED_PORT="${var_openziti_controller_port:-}"
[[ -n "$ZITI_CTRL_ADVERTISED_PORT" ]] || read -r -p "${TAB3}Please enter the controller port [1280]: " ZITI_CTRL_ADVERTISED_PORT || true
read -r -p "${TAB3}Please enter the controller port [1280]: " ZITI_CTRL_ADVERTISED_PORT
ZITI_CTRL_ADVERTISED_PORT=${ZITI_CTRL_ADVERTISED_PORT:-1280}
ZITI_USER="${var_openziti_controller_user:-}"
[[ -n "$ZITI_USER" ]] || read -r -p "${TAB3}Please enter the controller admin user [admin]: " ZITI_USER || true
read -r -p "${TAB3}Please enter the controller admin user [admin]: " ZITI_USER
ZITI_USER=${ZITI_USER:-admin}
GEN_PWD=$(head -c128 /dev/urandom | LC_ALL=C tr -dc 'A-Za-z0-9!@#$%^*_+~' | cut -c 1-12)
ZITI_PWD="${var_openziti_controller_password:-}"
[[ -n "$ZITI_PWD" ]] || read -r -p "${TAB3}Please enter the controller admin password [${GEN_PWD}]:" ZITI_PWD || true
read -r -p "${TAB3}Please enter the controller admin password [${GEN_PWD}]:" ZITI_PWD
ZITI_PWD=${ZITI_PWD:-$GEN_PWD}
CONFIG_FILE="/opt/openziti/etc/controller/bootstrap.env"
sed -i "s|^ZITI_CTRL_ADVERTISED_ADDRESS=.*|ZITI_CTRL_ADVERTISED_ADDRESS='${ZITI_CTRL_ADVERTISED_ADDRESS}'|" "$CONFIG_FILE"
+1 -2
View File
@@ -29,8 +29,7 @@ sed -i '0,/^ExecStart/ { /^ExecStart/ { n; s|^ExecStart.*|ExecStart=/opt/openzit
systemctl daemon-reload
msg_ok "Installed openziti"
prompt="${var_openziti_tunnel_enrollment_token:-}"
[[ -n "$prompt" ]] || read -r -p "${TAB3}Please paste an identity enrollment token(JTW)" prompt || true
read -r -p "${TAB3}Please paste an identity enrollment token(JTW)" prompt
if [[ ${prompt} ]]; then
msg_info "Adding identity"
echo "${prompt}" >/opt/openziti/etc/identities/identity.jwt
+6 -4
View File
@@ -27,13 +27,15 @@ fetch_and_deploy_gh_release "gerbil" "fosrl/gerbil" "singlefile" "latest" "/usr/
fetch_and_deploy_gh_release "traefik" "traefik/traefik" "prebuild" "latest" "/usr/bin" "traefik_v*_linux_$(arch_resolve).tar.gz"
pango_url="${var_pangolin_url:-}"
[[ -n "$pango_url" ]] || read -rp "${TAB3}Enter your Pangolin URL (ex: https://pangolin.example.com): " pango_url || true
[[ -n "$pango_url" ]] || { msg_error "No Pangolin URL given; set var_pangolin_url or answer the prompt"; exit 64; }
if [[ -z "$pango_url" ]]; then
read -rp "${TAB3}Enter your Pangolin URL (ex: https://pangolin.example.com): " pango_url
fi
[[ "$pango_url" != https://* && "$pango_url" != http://* ]] && pango_url="https://${pango_url}"
pango_email="${var_pangolin_email:-}"
[[ -n "$pango_email" ]] || read -rp "${TAB3}Enter your email address: " pango_email || true
[[ -n "$pango_email" ]] || { msg_error "No email address given; set var_pangolin_email or answer the prompt"; exit 64; }
if [[ -z "$pango_email" ]]; then
read -rp "${TAB3}Enter your email address: " pango_email
fi
msg_info "Setup Pangolin"
SECRET_KEY=$(random_password 32)
+6 -12
View File
@@ -38,22 +38,16 @@ CGO_ENABLED=1 go build -tags musl -o paperless-gpt .
msg_ok "Setup Paperless-GPT"
mkdir -p /opt/paperless-gpt-data
input_url="${var_paperless_gpt_enter_url:-}"
[[ -n "$input_url" ]] || read -rp "${TAB3}Do you want to enter the Paperless local URL now? (y/n) " input_url || true
if [[ $input_url =~ ^[Yy]([Ee][Ss])?$ ]]; then
PAPERLESS_BASE_URL="${var_paperless_gpt_url:-}"
[[ -n "$PAPERLESS_BASE_URL" ]] || read -rp "${TAB3}Enter your Paperless-NGX instance URL (e.g., http://192.168.1.100:8000): " PAPERLESS_BASE_URL || true
[[ -n "$PAPERLESS_BASE_URL" ]] || { msg_error "No Paperless-NGX URL given; set var_paperless_gpt_url or answer the prompt"; exit 64; }
read -rp "${TAB3}Do you want to enter the Paperless local URL now? (y/n) " input_url
if [[ $input_url =~ ^[Yy]$ ]]; then
read -rp "${TAB3}Enter your Paperless-NGX instance URL (e.g., http://192.168.1.100:8000): " PAPERLESS_BASE_URL
else
PAPERLESS_BASE_URL="http://your_paperless_ngx_url"
fi
input_token="${var_paperless_gpt_enter_token:-}"
[[ -n "$input_token" ]] || read -rp "${TAB3}Do you want to enter the Paperless API token now? (y/n) " input_token || true
if [[ $input_token =~ ^[Yy]([Ee][Ss])?$ ]]; then
PAPERLESS_API_TOKEN="${var_paperless_gpt_api_token:-}"
[[ -n "$PAPERLESS_API_TOKEN" ]] || read -rp "${TAB3}Enter your Paperless API token: " PAPERLESS_API_TOKEN || true
[[ -n "$PAPERLESS_API_TOKEN" ]] || { msg_error "No Paperless API token given; set var_paperless_gpt_api_token or answer the prompt"; exit 64; }
read -rp "${TAB3}Do you want to enter the Paperless API token now? (y/n) " input_token
if [[ $input_token =~ ^[Yy]$ ]]; then
read -rp "${TAB3}Enter your Paperless API token: " PAPERLESS_API_TOKEN
else
PAPERLESS_API_TOKEN="your_paperless_api_token"
fi
+1 -1
View File
@@ -172,7 +172,7 @@ systemctl enable -q --now paperless-webserver paperless-scheduler paperless-task
msg_ok "Created Services"
prompt="${var_paperless_ngx_adminer:-}"
[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add Adminer? <y/N> " prompt || true
[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add Adminer? <y/N> " prompt
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
setup_adminer
fi
+2 -2
View File
@@ -57,10 +57,10 @@ systemctl restart pihole-FTL.service
msg_ok "Installed Pi-hole"
prompt="${var_pihole_unbound:-}"
[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add Unbound? <y/N> " prompt || true
[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add Unbound? <y/N> " prompt
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
prompt="${var_pihole_unbound_dot:-}"
[[ -n "$prompt" ]] || read -r -p "${TAB3}Unbound is configured as a recursive DNS server by default, would you like it to be configured as a forwarding DNS server (using DNS-over-TLS (DoT)) instead? <y/N> " prompt || true
[[ -n "$prompt" ]] || read -r -p "${TAB3}Unbound is configured as a recursive DNS server by default, would you like it to be configured as a forwarding DNS server (using DNS-over-TLS (DoT)) instead? <y/N> " prompt
msg_info "Installing Unbound"
mkdir -p /etc/unbound/unbound.conf.d
cat <<EOF >/etc/unbound/unbound.conf.d/pi-hole.conf
+1 -3
View File
@@ -13,9 +13,7 @@ setting_up_container
network_check
update_os
public_url="${var_pocketid_url:-}"
[[ -n "$public_url" ]] || read -r -p "${TAB3}What public URL do you want to use (e.g. pocketid.mydomain.com)? " public_url || true
[[ -n "$public_url" ]] || { msg_error "No public URL given; set var_pocketid_url or answer the prompt"; exit 64; }
read -r -p "${TAB3}What public URL do you want to use (e.g. pocketid.mydomain.com)? " public_url
fetch_and_deploy_gh_release "pocket-id" "pocket-id/pocket-id" "singlefile" "latest" "/opt/pocket-id/" "pocket-id_linux_$(arch_resolve)"
msg_info "Configuring Pocket ID"
+2 -7
View File
@@ -13,11 +13,6 @@ 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")
@@ -54,7 +49,7 @@ msg_ok "Installed Podman"
mkdir -p /etc/containers/systemd
prompt="${var_podman_homeassistant_portainer:-}"
[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add Portainer? <y/N> " prompt || true
[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add Portainer? <y/N> " prompt
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
msg_info "Installing Portainer $PORTAINER_LATEST_VERSION"
podman volume create portainer_data >/dev/null
@@ -82,7 +77,7 @@ EOF
msg_ok "Installed Portainer $PORTAINER_LATEST_VERSION"
else
prompt="${var_podman_homeassistant_portainer_agent:-}"
[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add the Portainer Agent? <y/N> " prompt || true
[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add the Portainer Agent? <y/N> " prompt
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
msg_info "Installing Portainer agent $PORTAINER_AGENT_LATEST_VERSION"
cat <<EOF >/etc/containers/systemd/portainer-agent.container
+2 -2
View File
@@ -49,7 +49,7 @@ msg_ok "Installed Podman"
mkdir -p /etc/containers/systemd
prompt="${var_podman_portainer:-}"
[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add Portainer? <y/N> " prompt || true
[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add Portainer? <y/N> " prompt
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
msg_info "Installing Portainer $PORTAINER_LATEST_VERSION"
podman volume create portainer_data >/dev/null
@@ -78,7 +78,7 @@ EOF
msg_ok "Installed Portainer $PORTAINER_LATEST_VERSION"
else
prompt="${var_podman_portainer_agent:-}"
[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add the Portainer Agent? <y/N> " prompt || true
[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add the Portainer Agent? <y/N> " prompt
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
msg_info "Installing Portainer agent $PORTAINER_AGENT_LATEST_VERSION"
$STD podman pull docker.io/portainer/agent:latest
+4 -11
View File
@@ -14,11 +14,9 @@ network_check
update_os
setup_deb_based() {
ver="${var_postgresql_version:-}"
[[ -n "$ver" ]] || read -r -p "${TAB3}Enter PostgreSQL version (15/16/17/18) [17]: " ver || true
ver="${ver:-17}"
read -r -p "${TAB3}Enter PostgreSQL version (15/16/17/18): " ver
[[ $ver =~ ^(15|16|17|18)$ ]] || {
msg_error "Invalid PostgreSQL version: ${ver} (expected 15, 16, 17 or 18)"
echo "Invalid version"
exit 64
}
PG_VERSION=$ver setup_postgresql
@@ -138,13 +136,8 @@ EOF
}
setup_alpine() {
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
}
read -r -p "${TAB3}Enter PostgreSQL version (15/16/17): " ver
[[ $ver =~ ^(15|16|17)$ ]] || { echo "Invalid version"; exit 64; }
msg_info "Installing PostgreSQL ${ver}"
$STD apk add --no-cache postgresql${ver} postgresql${ver}-contrib postgresql${ver}-openrc sudo
+3 -9
View File
@@ -47,15 +47,9 @@ msg_ok "Installed PHP"
MARIADB_DB_NAME="panel" MARIADB_DB_USER="pterodactyl" MARIADB_DB_CREDS_FILE="$HOME/pterodactyl-panel.creds" setup_mariadb_db
ADMIN_EMAIL="${var_pterodactyl_panel_admin_email:-}"
[[ -n "$ADMIN_EMAIL" ]] || read -r -p "${TAB3}Provide an email address for admin login, this should be a valid email address: " ADMIN_EMAIL || true
[[ -n "$ADMIN_EMAIL" ]] || { msg_error "No admin email given; set var_pterodactyl_panel_admin_email or answer the prompt"; exit 64; }
NAME_FIRST="${var_pterodactyl_panel_first_name:-}"
[[ -n "$NAME_FIRST" ]] || read -r -p "${TAB3}Enter your First Name: " NAME_FIRST || true
[[ -n "$NAME_FIRST" ]] || { msg_error "No first name given; set var_pterodactyl_panel_first_name or answer the prompt"; exit 64; }
NAME_LAST="${var_pterodactyl_panel_last_name:-}"
[[ -n "$NAME_LAST" ]] || read -r -p "${TAB3}Enter your Last Name: " NAME_LAST || true
[[ -n "$NAME_LAST" ]] || { msg_error "No last name given; set var_pterodactyl_panel_last_name or answer the prompt"; exit 64; }
read -p "${TAB3}Provide an email address for admin login, this should be a valid email address: " ADMIN_EMAIL
read -p "${TAB3}Enter your First Name: " NAME_FIRST
read -p "${TAB3}Enter your Last Name: " NAME_LAST
fetch_and_deploy_gh_release "pterodactyl-panel" "pterodactyl/panel" "prebuild" "latest" "/opt/pterodactyl-panel" "panel.tar.gz"
+5 -2
View File
@@ -13,8 +13,11 @@ setting_up_container
network_check
update_os
prompt="${var_rustdesk_api:-}"
[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add the RustDesk API web UI (lejianwen/rustdesk-api, unmaintained since 09/2025)? <y/N> " prompt || true
if [[ -n "${var_rustdesk_api:-}" ]]; then
prompt="$var_rustdesk_api"
else
read -r -p "${TAB3}Would you like to add the RustDesk API web UI (lejianwen/rustdesk-api, unmaintained since 09/2025)? <y/N> " prompt
fi
INSTALL_API=0
[[ "${prompt,,}" =~ ^(y|yes|true)$ ]] && INSTALL_API=1
API_PASS="$(random_password 16)"
+1 -1
View File
@@ -41,7 +41,7 @@ $STD uv pip install -r /opt/sabnzbd/requirements.txt --python=/opt/sabnzbd/venv/
msg_ok "Installed SABnzbd"
prompt="${var_sabnzbd_par2_turbo:-}"
[[ -n "$prompt" ]] || read -r -p "Would you like to install par2cmdline-turbo? <y/N> " prompt || true
[[ -n "$prompt" ]] || read -r -p "Would you like to install par2cmdline-turbo? <y/N> " prompt
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
mv /usr/bin/par2 /usr/bin/par2.old
fetch_and_deploy_gh_release "par2cmdline-turbo" "animetosho/par2cmdline-turbo" "prebuild" "latest" "/usr/bin/" "*-linux-$(arch_resolve).zip"
+2 -4
View File
@@ -47,8 +47,7 @@ echo " 3) Use an existing Flaresolverr/Byparr LXC"
echo " 4) Disable captcha bypassing altogether (not recommended)"
echo ""
DEPLOYMENT_TYPE="${var_shelfmark_deployment_type:-}"
[[ -n "$DEPLOYMENT_TYPE" ]] || read -r -p "${TAB3}Select deployment type [1]: " DEPLOYMENT_TYPE || true
read -r -p "${TAB3}Select deployment type [1]: " DEPLOYMENT_TYPE
DEPLOYMENT_TYPE="${DEPLOYMENT_TYPE:-1}"
if [[ "$(arch_resolve)" == "arm64" && "$DEPLOYMENT_TYPE" == "2" ]]; then
msg_warn "FlareSolverr has no arm64 build; using Shelfmark's internal bypasser instead"
@@ -70,8 +69,7 @@ case "$DEPLOYMENT_TYPE" in
echo "Example: http://flaresoverr.homelab.lan:8191 or"
echo "http://192.168.10.99:8191"
echo ""
BYPASSER_URL="${var_shelfmark_bypasser_url:-}"
[[ -n "$BYPASSER_URL" ]] || read -r -p "FlareSolverr/Byparr URL: " BYPASSER_URL || true
read -r -p "FlareSolverr/Byparr URL: " BYPASSER_URL
if [[ -z "$BYPASSER_URL" ]]; then
msg_warn "No Flaresolverr/Byparr URL provided. Falling back to Shelfmark's internal bypasser."
+1 -1
View File
@@ -18,7 +18,7 @@ mkdir -p /opt/silverbullet/space
RUNTIME_API_ENV=""
runtime_api_prompt="${var_silverbullet_runtime_api:-}"
[[ -n "$runtime_api_prompt" ]] || read -rp "${TAB3}Enable Silverbullet Runtime API? Requires Chromium (~700MB). Uses ~200MB extra RAM. (y/N): " runtime_api_prompt || true
[[ -n "$runtime_api_prompt" ]] || read -rp "${TAB3}Enable Silverbullet Runtime API? Requires Chromium (~700MB). Uses ~200MB extra RAM. (y/N): " runtime_api_prompt
if [[ "${runtime_api_prompt,,}" =~ ^(y|yes)$ ]]; then
msg_info "Installing Chromium for Runtime API"
$STD apt install -y chromium
+1 -1
View File
@@ -37,7 +37,7 @@ sed -i \
msg_ok "Configured Slskd"
soularr="${var_slskd_soularr:-}"
[[ -n "$soularr" ]] || read -rp "${TAB3}Do you want to install Soularr? y/N " soularr || true
[[ -n "$soularr" ]] || read -rp "${TAB3}Do you want to install Soularr? y/N " soularr
if [[ ${soularr,,} =~ ^(y|yes)$ ]]; then
PYTHON_VERSION="3.11" setup_uv
fetch_and_deploy_gh_release "Soularr" "mrusse/soularr" "tarball" "latest" "/opt/soularr"
+1 -2
View File
@@ -46,8 +46,7 @@ echo 'export PATH="$PATH:/opt/mssql-tools18/bin"' >>~/.bash_profile
source ~/.bash_profile
msg_ok "Installed SQL Server Tools"
prompt="${var_sqlserver2022_setup_now:-}"
[[ -n "$prompt" ]] || read -r -p "${TAB3}Do you want to run the SQL server setup now? (Later is also possible) <y/N>" prompt || true
read -r -p "${TAB3}Do you want to run the SQL server setup now? (Later is also possible) <y/N>" prompt
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
/opt/mssql/bin/mssql-conf setup
else
+1 -2
View File
@@ -46,8 +46,7 @@ echo 'export PATH="$PATH:/opt/mssql-tools18/bin"' >>~/.bash_profile
source ~/.bash_profile
msg_ok "Installed SQL Server Tools"
prompt="${var_sqlserver2025_setup_now:-}"
[[ -n "$prompt" ]] || read -r -p "${TAB3}Do you want to run the SQL Server setup now? (Later is also possible) <y/N>" prompt || true
read -r -p "${TAB3}Do you want to run the SQL Server setup now? (Later is also possible) <y/N>" prompt
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
/opt/mssql/bin/mssql-conf setup
else
+32 -48
View File
@@ -17,55 +17,24 @@ msg_info "Installing Dependencies"
$STD apt install -y \
build-essential \
git \
cmake \
sqlite3 \
pkg-config \
libsqlite3-dev \
argon2 \
ffmpeg \
libcurl4t64 \
libxml2
sqlite3 \
python3-setuptools \
ffmpeg
msg_ok "Installed Dependencies"
NODE_VERSION="24" NODE_MODULE="corepack" setup_nodejs
NODE_VERSION="24" NODE_MODULE="corepack,yarn" setup_nodejs
fetch_and_deploy_gh_release "readium" "readium/cli" "prebuild" "v0.9.1" "/opt/readium" "readium_linux_$(arch_resolve "x86_64" "arm64").tar.gz"
fetch_and_deploy_gh_release "readium" "readium/cli" "prebuild" "latest" "/opt/readium" "readium_linux_$(arch_resolve "x86_64" "arm64").tar.gz"
ln -sf /opt/readium/readium /usr/local/bin/readium
fetch_and_deploy_gl_release "storyteller" "storyteller-platform/storyteller" "tarball" "latest" "/opt/storyteller" "" "web-v2"
msg_info "Building Storyteller (Patience)"
msg_info "Setting up Storyteller"
cd /opt/storyteller
$STD corepack yarn install
export NODE_ENV=production
export NEXT_TELEMETRY_DISABLED=1
export SQLITE_NATIVE_BINDING=/opt/storyteller/node_modules/better-sqlite3/build/Release/better_sqlite3.node
$STD corepack yarn workspaces foreach -Rpt --from @storyteller-platform/web --exclude @storyteller-platform/eslint run build
STANDALONE=/opt/storyteller/applications/web/.next/standalone
WEB_DIR="$STANDALONE/applications/web"
mkdir -p "$WEB_DIR"/{public,.next/static,.next/cache,migrations,sqlite,scripts}
cp -rT applications/web/public "$WEB_DIR/public"
cp -rT applications/web/.next/static "$WEB_DIR/.next/static"
cp -rT applications/web/migrations "$WEB_DIR/migrations"
cp applications/web/sqlite/uuid.c.so "$WEB_DIR/sqlite/"
cp docker-scripts/reset-password.sh "$WEB_DIR/scripts/"
cp -r applications/web/work-dist applications/web/file-write-dist "$WEB_DIR/"
mkdir -p "$WEB_DIR/work-dist/@storyteller-platform/align/prebuilds"
cp -r "libraries/align/prebuilds/linux-$(arch_resolve "x64" "arm64")" "$WEB_DIR/work-dist/@storyteller-platform/align/prebuilds/"
cp node_modules/@echogarden/icu-segmentation-wasm/wasm/*.wasm "$WEB_DIR/work-dist/"
cp -rT node_modules/@parcel "$STANDALONE/node_modules/@parcel"
cp -rT node_modules/kuromoji "$STANDALONE/node_modules/kuromoji"
msg_ok "Built Storyteller"
msg_info "Installing Whisper"
WHISPER_VARIANT="linux-$(arch_resolve "x64" "arm64")-cpu"
$STD node /opt/storyteller/libraries/ghost-story/dist/cli/bin.js install binary "$WHISPER_VARIANT"
$STD node /opt/storyteller/libraries/ghost-story/dist/cli/bin.js install model tiny.en
if [[ "$WHISPER_VARIANT" == "linux-x64-cpu" ]]; then
$STD node /opt/storyteller/libraries/ghost-story/dist/cli/bin.js install binary linux-x64-cpu-legacy
fi
msg_ok "Installed Whisper"
msg_info "Configuring Storyteller"
mkdir -p /opt/storyteller/data
$STD corepack yarn install --network-timeout 600000
$STD gcc -g -fPIC -rdynamic -shared applications/web/sqlite/uuid.c -o applications/web/sqlite/uuid.c.so
STORYTELLER_SECRET_KEY=$(openssl rand -base64 32)
cat <<EOF >/opt/storyteller/.env
STORYTELLER_SECRET_KEY=${STORYTELLER_SECRET_KEY}
@@ -76,14 +45,33 @@ READIUM_PORT=9000
NODE_ENV=production
NEXT_TELEMETRY_DISABLED=1
EOF
chmod 600 /opt/storyteller/.env
ln -sf /opt/storyteller/.env "$WEB_DIR/.env"
mkdir -p /opt/storyteller/data
cat <<EOF >~/storyteller.creds
Storyteller Credentials
=======================
Secret Key: ${STORYTELLER_SECRET_KEY}
EOF
msg_ok "Configured Storyteller"
msg_ok "Set up Storyteller"
msg_info "Building Storyteller"
cd /opt/storyteller
export CI=1
export NODE_ENV=production
export NEXT_TELEMETRY_DISABLED=1
export SQLITE_NATIVE_BINDING=/opt/storyteller/node_modules/better-sqlite3/build/Release/better_sqlite3.node
$STD corepack yarn workspaces foreach -Rpt --from @storyteller-platform/web --exclude @storyteller-platform/eslint run build
mkdir -p /opt/storyteller/applications/web/.next/standalone/applications/web/.next/static
cp -rT /opt/storyteller/applications/web/.next/static /opt/storyteller/applications/web/.next/standalone/applications/web/.next/static
if [[ -d /opt/storyteller/applications/web/public ]]; then
mkdir -p /opt/storyteller/applications/web/.next/standalone/applications/web/public
cp -rT /opt/storyteller/applications/web/public /opt/storyteller/applications/web/.next/standalone/applications/web/public
fi
mkdir -p /opt/storyteller/applications/web/.next/standalone/applications/web/migrations
cp -rT /opt/storyteller/applications/web/migrations /opt/storyteller/applications/web/.next/standalone/applications/web/migrations
mkdir -p /opt/storyteller/applications/web/.next/standalone/applications/web/sqlite
cp -rT /opt/storyteller/applications/web/sqlite /opt/storyteller/applications/web/.next/standalone/applications/web/sqlite
ln -sf /opt/storyteller/.env /opt/storyteller/applications/web/.next/standalone/applications/web/.env
msg_ok "Built Storyteller"
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/storyteller.service
@@ -94,12 +82,8 @@ After=network.target
[Service]
Type=simple
User=root
WorkingDirectory=${WEB_DIR}
WorkingDirectory=/opt/storyteller/applications/web/.next/standalone/applications/web
EnvironmentFile=/opt/storyteller/.env
Environment=SQLITE_NATIVE_BINDING=${STANDALONE}/node_modules/better-sqlite3/build/Release/better_sqlite3.node
Environment=ERROR_ALIGN_NATIVE_BINDING=${WEB_DIR}/work-dist/@storyteller-platform/align/
Environment=STORYTELLER_WORKER=worker.mjs
Environment=STORYTELLER_FILE_WRITE_WORKER=fileWriteWorker.mjs
ExecStart=/usr/bin/node --enable-source-maps server.js
Restart=on-failure
RestartSec=5
+1 -2
View File
@@ -47,9 +47,8 @@ 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
+2 -6
View File
@@ -32,9 +32,7 @@ Password: ${PASS}
EOF
msg_ok "Set up Tinyauth"
app_url="${var_tinyauth_app_url:-}"
[[ -n "$app_url" ]] || read -r -p "${TAB3}Enter your Tinyauth subdomain (e.g. https://tinyauth.example.com): " app_url || true
[[ -n "$app_url" ]] || { msg_error "No Tinyauth app URL given; set var_tinyauth_app_url or answer the prompt"; exit 64; }
read -r -p "${TAB3}Enter your Tinyauth subdomain (e.g. https://tinyauth.example.com): " app_url
msg_info "Creating Service"
cat <<EOF >/opt/tinyauth/.env
@@ -79,9 +77,7 @@ Password: ${PASS}
EOF
msg_ok "Configured Tinyauth"
app_url="${var_tinyauth_app_url:-}"
[[ -n "$app_url" ]] || read -r -p "${TAB3}Enter your Tinyauth subdomain (e.g. https://tinyauth.example.com): " app_url || true
[[ -n "$app_url" ]] || { msg_error "No Tinyauth app URL given; set var_tinyauth_app_url or answer the prompt"; exit 64; }
read -r -p "${TAB3}Enter your Tinyauth subdomain (e.g. https://tinyauth.example.com): " app_url
cat <<EOF >/opt/tinyauth/.env
TINYAUTH_DATABASE_PATH=/opt/tinyauth/database.db
+1 -1
View File
@@ -106,7 +106,7 @@ setup_alpine() {
msg_ok "Installed Traefik"
enable_webui="${var_traefik_webui:-}"
[[ -n "$enable_webui" ]] || read -r -p "${TAB3}Enable Traefik WebUI (Port 8080)? [y/N]: " enable_webui || true
[[ -n "$enable_webui" ]] || read -p "${TAB3}Enable Traefik WebUI (Port 8080)? [y/N]: " enable_webui
if [[ "${enable_webui,,}" =~ ^(y|yes)$ ]]; then
msg_info "Configuring Traefik WebUI"
sed -i 's/localhost//g' /etc/traefik/traefik.yaml
+6 -6
View File
@@ -14,17 +14,17 @@ network_check
update_os
install -d -m 0700 /etc/twingate
access_token="${var_twingate_connector_access_token:-}"
refresh_token="${var_twingate_connector_refresh_token:-}"
network="${var_twingate_connector_network:-}"
access_token=""
refresh_token=""
network=""
while [[ -z "$access_token" ]]; do
read -rp "${TAB3}Please enter your access token: " access_token || { msg_error "No access token given; set var_twingate_connector_access_token or answer the prompt"; exit 64; }
read -rp "${TAB3}Please enter your access token: " access_token
done
while [[ -z "$refresh_token" ]]; do
read -rp "${TAB3}Please enter your refresh token: " refresh_token || { msg_error "No refresh token given; set var_twingate_connector_refresh_token or answer the prompt"; exit 64; }
read -rp "${TAB3}Please enter your refresh token: " refresh_token
done
while [[ -z "$network" ]]; do
read -rp "${TAB3}Please enter your network name: " network || { msg_error "No network name given; set var_twingate_connector_network or answer the prompt"; exit 64; }
read -rp "${TAB3}Please enter your network name: " network
done
msg_info "Setup Twingate Repository"
-5
View File
@@ -13,11 +13,6 @@ 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."
+2 -2
View File
@@ -37,10 +37,10 @@ setup_deb_based() {
echo
prompt="${var_valkey_tls:-}"
[[ -n "$prompt" ]] || read -r -p "${TAB3}Enable TLS for Valkey (Sentinel mode does not supported)? [y/N]: " prompt || true
[[ -n "$prompt" ]] || read -r -p "${TAB3}Enable TLS for Valkey (Sentinel mode does not supported)? [y/N]: " prompt
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
tls_only="${var_valkey_tls_only:-}"
[[ -n "$tls_only" ]] || read -r -p "${TAB3}Use TLS-only mode (disable TCP port 6379)? [y/N]: " tls_only || true
[[ -n "$tls_only" ]] || read -r -p "${TAB3}Use TLS-only mode (disable TCP port 6379)? [y/N]: " tls_only
msg_info "Configuring TLS for Valkey..."
create_self_signed_cert "Valkey"
+1 -1
View File
@@ -17,7 +17,7 @@ fetch_and_deploy_gh_release "versitygw" "versity/versitygw" "binary"
WEBUI_CONF=""
webui_prompt="${var_versitygw_webgui:-}"
[[ -n "$webui_prompt" ]] || read -rp "Would you like to enable the VersityGW WebGUI (Beta)? (y/N): " webui_prompt || true
[[ -n "$webui_prompt" ]] || read -rp "Would you like to enable the VersityGW WebGUI (Beta)? (y/N): " webui_prompt
if [[ "${webui_prompt,,}" =~ ^(y|yes)$ ]]; then
WEBUI_CONF="\nVGW_WEBUI_PORT=:7071\nVGW_WEBUI_NO_TLS=true"
msg_ok "WebGUI will be enabled on port 7071"
+1 -1
View File
@@ -28,7 +28,7 @@ fetch_and_deploy_gh_release "victoriametrics" "VictoriaMetrics/VictoriaMetrics"
fetch_and_deploy_gh_release "vmutils" "VictoriaMetrics/VictoriaMetrics" "prebuild" "$victoriametrics_release" "/opt/victoriametrics" "$vmutils_filename"
prompt="${var_victoriametrics_logs:-}"
[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add VictoriaLogs? <y/N> " prompt || true
[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add VictoriaLogs? <y/N> " prompt
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
vl_release_json="$(mktemp)"
+2 -2
View File
@@ -25,7 +25,7 @@ setup_deb_based() {
msg_ok "Installed WireGuard"
prompt="${var_wireguard_wgdashboard:-}"
[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add WGDashboard? <y/N> " prompt || true
[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add WGDashboard? <y/N> " prompt
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
git clone -q https://github.com/WGDashboard/WGDashboard.git /etc/wgdashboard
@@ -111,7 +111,7 @@ EOF
msg_ok "Installed WireGuard"
INSTALL_WGD="${var_wireguard_wgdashboard:-}"
[[ -n "$INSTALL_WGD" ]] || read -rp "${TAB3}Do you want to install WGDashboard? (y/N): " INSTALL_WGD || true
[[ -n "$INSTALL_WGD" ]] || read -rp "${TAB3}Do you want to install WGDashboard? (y/N): " INSTALL_WGD
if [[ "${INSTALL_WGD,,}" =~ ^(y|yes)$ ]]; then
msg_info "Installing additional dependencies for WGDashboard"
$STD apk add --no-cache \
+4 -10
View File
@@ -16,8 +16,7 @@ update_os
PG_VERSION="17" setup_postgresql
PG_DB_NAME="zabbixdb" PG_DB_USER="zabbix" setup_postgresql_db
ZABBIX_CHOICE="${var_zabbix_version:-}"
[[ -n "$ZABBIX_CHOICE" ]] || read -rp "Choose Zabbix version [1] 7.0 LTS [2] 7.4 (Latest Stable) [3] Latest available (default: 2): " ZABBIX_CHOICE || true
read -rp "Choose Zabbix version [1] 7.0 LTS [2] 7.4 (Latest Stable) [3] Latest available (default: 2): " ZABBIX_CHOICE
ZABBIX_CHOICE=${ZABBIX_CHOICE:-2}
case "$ZABBIX_CHOICE" in
1) ZABBIX_VERSION="7.0" ;;
@@ -33,10 +32,8 @@ 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}/${ZABBIX_REPO_DIR}/pool/main/z/zabbix-release/zabbix-release_latest_${ZABBIX_VERSION}+debian13_all.deb"
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_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"
@@ -60,9 +57,8 @@ sed -i "s/^DBUser=.*/DBUser=$PG_DB_USER/" /etc/zabbix/zabbix_server.conf
sed -i "s/^# DBPassword=.*/DBPassword=$PG_DB_PASS/" /etc/zabbix/zabbix_server.conf
msg_ok "Installed Zabbix $ZABBIX_VERSION"
AGENT_CHOICE="${var_zabbix_agent:-}"
while true; do
[[ -n "$AGENT_CHOICE" ]] || read -rp "Which agent do you want to install? [1=agent (classic), 2=agent2 (modern), default=1]: " AGENT_CHOICE || AGENT_CHOICE="1"
read -rp "Which agent do you want to install? [1=agent (classic), 2=agent2 (modern), default=1]: " AGENT_CHOICE
case "$AGENT_CHOICE" in
2)
AGENT_PKG="zabbix-agent2"
@@ -74,7 +70,6 @@ while true; do
;;
*)
echo "Invalid choice. Please enter 1 or 2."
AGENT_CHOICE=""
;;
esac
done
@@ -84,8 +79,7 @@ if [ "$AGENT_PKG" = "zabbix-agent2" ]; then
echo "Choose plugins for Zabbix Agent2:"
echo "1) PostgreSQL only (default, recommended)"
echo "2) All plugins (may cause issues)"
PLUGIN_CHOICE="${var_zabbix_plugins:-}"
[[ -n "$PLUGIN_CHOICE" ]] || read -rp "Choose option [1-2]: " PLUGIN_CHOICE || true
read -rp "Choose option [1-2]: " PLUGIN_CHOICE
case "$PLUGIN_CHOICE" in
2)
+472 -98
View File
@@ -1,134 +1,508 @@
#!/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
#!/usr/bin/env bash
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
# Copyright (c) 2021-2026 tteck
# Author: tteck (tteckster)
# License: MIT
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
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,"
source /dev/stdin <<<$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func)
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"
set -Eeo pipefail
shopt -s inherit_errexit
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
trap 'error_handler $LINENO "$BASH_COMMAND"' ERR
trap cleanup EXIT
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" "130"' SIGINT
trap 'post_update_to_api "failed" "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
}
vm_require_arch arm64
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
}
TEMP_DIR=$(mktemp -d)
pushd "$TEMP_DIR" >/dev/null
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
vm_preflight
vm_require_tools jq xz
function msg_info() {
local msg="$1"
echo -ne "${TAB}${YW}${HOLD}${msg}${HOLD}"
}
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 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
}
function default_settings() {
METHOD="default"
BRANCH="${VM_OS_VERSION:-$STABLE}"
echo -e "${DGN}Using HAOS Version: ${BGN}${STABLE}${CL}"
BRANCH=${STABLE}
VMID=$(get_valid_nextid)
vm_apply_machine_type "virt"
DISK_SIZE="32G"
DISK_CACHE=""
CPU_TYPE=""
HN="haos"
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}"
CORE_COUNT="2"
echo -e "${DGN}Allocated RAM: ${BGN}4096${CL}"
RAM_SIZE="4096"
echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}"
BRG="vmbr0"
MAC="$GEN_MAC"
echo -e "${DGN}Using MAC Address: ${BGN}$GEN_MAC${CL}"
MAC=$GEN_MAC
echo -e "${DGN}Using VLAN: ${BGN}Default${CL}"
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"
vm_echo_default_settings
echo -e "${BL}Creating a HAOS VM using the above default settings${CL}"
}
function advanced_settings() {
METHOD="advanced"
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"
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}"
else
exit_script
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
fi
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
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}"
advanced_settings
fi
}
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
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
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
URL="$VM_RELEASE_URL"
var_version="$VM_RELEASE_VERSION"
}
ARCH_CHECK
START_SCRIPT
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))
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
fi
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_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"
msg_info "Creating HAOS VM"
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
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
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."
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"