diff --git a/install/aria2-install.sh b/install/aria2-install.sh index 645efbf5d..cdc65c06b 100644 --- a/install/aria2-install.sh +++ b/install/aria2-install.sh @@ -17,7 +17,8 @@ msg_info "Installing Aria2" $STD apt install -y aria2 msg_ok "Installed Aria2" -read -r -p "${TAB3}Would you like to add AriaNG? " prompt +prompt="${var_aria2_ariang:-}" +[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add AriaNG? " prompt if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then msg_info "Installing Dependencies" $STD apt install -y nginx diff --git a/install/bytestash-install.sh b/install/bytestash-install.sh index 2952feec4..5b24cca92 100644 --- a/install/bytestash-install.sh +++ b/install/bytestash-install.sh @@ -24,7 +24,8 @@ cd /opt/bytestash/client $STD npm install msg_ok "Installed ByteStash" -read -rp "${TAB3}Do you want to allow registration of multiple accounts? [y/n]: " allowreg +allowreg="${var_bytestash_registration:-}" +[[ -n "$allowreg" ]] || read -rp "${TAB3}Do you want to allow registration of multiple accounts? [y/n]: " allowreg msg_info "Creating Service" cat </etc/systemd/system/bytestash-backend.service @@ -42,7 +43,7 @@ Environment=JWT_SECRET=$JWT_SECRET WantedBy=multi-user.target EOF -if [[ "$allowreg" =~ ^[Yy]$ ]]; then +if [[ "${allowreg,,}" =~ ^(y|yes)$ ]]; then sed -i '8i\Environment=ALLOW_NEW_ACCOUNTS=true' /etc/systemd/system/bytestash-backend.service fi diff --git a/install/caddy-install.sh b/install/caddy-install.sh index 49762836c..28c5cdedd 100644 --- a/install/caddy-install.sh +++ b/install/caddy-install.sh @@ -30,7 +30,8 @@ setup_deb_based() { $STD apt install -y caddy msg_ok "Installed Caddy" - read -r -p "${TAB3}Would you like to install xCaddy Addon? " prompt + prompt="${var_caddy_xcaddy:-}" + [[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to install xCaddy Addon? " prompt if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then setup_go fetch_and_deploy_gh_release "xcaddy" "caddyserver/xcaddy" "binary" @@ -75,7 +76,8 @@ EOF EOF msg_ok "Installed Caddy" - read -r -p "${TAB3}Would you like to install xCaddy Addon? " prompt + prompt="${var_caddy_xcaddy:-}" + [[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to install xCaddy Addon? " 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" diff --git a/install/cockpit-install.sh b/install/cockpit-install.sh index b7a8885d9..5a59316df 100644 --- a/install/cockpit-install.sh +++ b/install/cockpit-install.sh @@ -31,7 +31,10 @@ sed -i "s/root//g" /etc/cockpit/disallowed-users msg_ok "Installed Cockpit" # 45Drives only publishes amd64 packages -[[ "$(arch_resolve)" == "arm64" ]] || read -r -p "Would you like to install 45Drives' cockpit-file-sharing, cockpit-identities, and cockpit-navigator " prompt +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 " prompt +fi if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then msg_info "Installing 45Drives' cockpit extensions" setup_deb822_repo "45drives" \ diff --git a/install/cryptpad-install.sh b/install/cryptpad-install.sh index ed9e61b42..d74b9e875 100644 --- a/install/cryptpad-install.sh +++ b/install/cryptpad-install.sh @@ -19,14 +19,15 @@ msg_ok "Installed Dependencies" NODE_VERSION="22" setup_nodejs -read -rp "${TAB3}Install OnlyOffice components instead of CKEditor? (Y/N): " onlyoffice +onlyoffice="${var_cryptpad_onlyoffice:-}" +[[ -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" cd /opt/cryptpad $STD npm ci --allow-git=all $STD npm run install:components -if [[ "$onlyoffice" =~ ^[Yy]$ ]]; then +if [[ "${onlyoffice,,}" =~ ^(y|yes)$ ]]; then $STD bash -c "./install-onlyoffice.sh --accept-license" fi cp config/config.example.js config/config.js diff --git a/install/emqx-install.sh b/install/emqx-install.sh index d08a6d6a1..7c7ed9cf6 100644 --- a/install/emqx-install.sh +++ b/install/emqx-install.sh @@ -38,7 +38,8 @@ rm -f "$DEB_FILE" echo "$LATEST_VERSION" >~/.emqx msg_ok "Installed EMQX" -read -r -p "${TAB3}Would you like to disable the EMQX MQ feature? (reduces disk/CPU usage) " prompt +prompt="${var_emqx_disable_mq:-}" +[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to disable the EMQX MQ feature? (reduces disk/CPU usage) " prompt if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then msg_info "Disabling EMQX MQ feature" mkdir -p /etc/emqx diff --git a/install/headscale-install.sh b/install/headscale-install.sh index 4e1ea38c3..66b6d1329 100644 --- a/install/headscale-install.sh +++ b/install/headscale-install.sh @@ -15,7 +15,8 @@ update_os fetch_and_deploy_gh_release "headscale" "juanfont/headscale" "binary" -read -r -p "${TAB3}Would you like to add headscale-admin UI? " prompt +prompt="${var_headscale_admin:-}" +[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add headscale-admin UI? " prompt if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then fetch_and_deploy_gh_release "headscale-admin" "GoodiesHQ/headscale-admin" "prebuild" "latest" "/opt/headscale-admin" "admin.zip" diff --git a/install/influxdb-install.sh b/install/influxdb-install.sh index 772b22d21..f3e223e26 100644 --- a/install/influxdb-install.sh +++ b/install/influxdb-install.sh @@ -50,7 +50,8 @@ else fi msg_ok "Installed InfluxDB" -read -r -p "${TAB3}Would you like to add Telegraf? " prompt +prompt="${var_influxdb_telegraf:-}" +[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add Telegraf? " prompt if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then msg_info "Installing Telegraf" $STD apt install -y telegraf diff --git a/install/linkwarden-install.sh b/install/linkwarden-install.sh index 08df2319c..6350938fb 100644 --- a/install/linkwarden-install.sh +++ b/install/linkwarden-install.sh @@ -24,7 +24,8 @@ PG_VERSION="16" setup_postgresql RUST_CRATES="monolith" setup_rust PG_DB_NAME="linkwardendb" PG_DB_USER="linkwarden" setup_postgresql_db -read -r -p "${TAB3}Would you like to add Adminer? " prompt +prompt="${var_linkwarden_adminer:-}" +[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add Adminer? " prompt if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then setup_adminer fi diff --git a/install/mariadb-install.sh b/install/mariadb-install.sh index be400ae86..a9d0a3025 100644 --- a/install/mariadb-install.sh +++ b/install/mariadb-install.sh @@ -21,7 +21,8 @@ setup_deb_based() { sed -i 's/^bind-address/#bind-address/g' /etc/mysql/mariadb.conf.d/50-server.cnf msg_ok "Setup MariaDB" - read -r -p "${TAB3}Would you like to add PhpMyAdmin? " prompt + prompt="${var_mariadb_phpmyadmin:-}" + [[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add PhpMyAdmin? " prompt if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then msg_info "Installing phpMyAdmin" $STD apt install -y \ @@ -58,7 +59,8 @@ setup_alpine() { $STD rc-service mariadb start msg_ok "MariaDB Configured" - read -r -p "${TAB3}Would you like to install Adminer with lighttpd? : " prompt + prompt="${var_mariadb_adminer:-}" + [[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to install Adminer with lighttpd? : " prompt if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then msg_info "Installing Adminer and dependencies" $STD apk add --no-cache \ diff --git a/install/meilisearch-install.sh b/install/meilisearch-install.sh index ede7cd80a..6fe7fff77 100644 --- a/install/meilisearch-install.sh +++ b/install/meilisearch-install.sh @@ -15,7 +15,8 @@ update_os MEILISEARCH_BIND="0.0.0.0:7700" setup_meilisearch -read -r -p "${TAB3}Do you want add meilisearch-ui? [y/n]: " prompt +prompt="${var_meilisearch_ui:-}" +[[ -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" diff --git a/install/openwebui-install.sh b/install/openwebui-install.sh index 752fb7231..803af6d02 100644 --- a/install/openwebui-install.sh +++ b/install/openwebui-install.sh @@ -26,7 +26,8 @@ setup_hwaccel PYTHON_VERSION="3.12" setup_uv OTEL_ARGS=() -read -r -p "${TAB3}Would you like to install OpenTelemetry instrumentation packages (requires manual .env configuration)? " prompt +prompt="${var_openwebui_otel:-}" +[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to install OpenTelemetry instrumentation packages (requires manual .env configuration)? " prompt if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then for pkg in \ opentelemetry-api \ @@ -52,7 +53,8 @@ for attempt in $(seq 1 3); do done msg_ok "Installed Open WebUI" -read -r -p "${TAB3}Would you like to add Ollama? " prompt +prompt="${var_openwebui_ollama:-}" +[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add Ollama? " prompt if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then if [[ "$(arch_resolve)" == "amd64" ]]; then msg_info "Setting up IntelĀ® Repositories" diff --git a/install/paperless-ngx-install.sh b/install/paperless-ngx-install.sh index 16bbca14d..a4d8cfa04 100644 --- a/install/paperless-ngx-install.sh +++ b/install/paperless-ngx-install.sh @@ -163,7 +163,8 @@ EOF systemctl enable -q --now paperless-webserver paperless-scheduler paperless-task-queue paperless-consumer msg_ok "Created Services" -read -r -p "${TAB3}Would you like to add Adminer? " prompt +prompt="${var_paperless_ngx_adminer:-}" +[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add Adminer? " prompt if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then setup_adminer fi diff --git a/install/pihole-install.sh b/install/pihole-install.sh index 7b9757b0d..fdc882bc8 100644 --- a/install/pihole-install.sh +++ b/install/pihole-install.sh @@ -56,9 +56,11 @@ $STD pihole-FTL --config ntp.sync.interval 0 systemctl restart pihole-FTL.service msg_ok "Installed Pi-hole" -read -r -p "${TAB3}Would you like to add Unbound? " prompt +prompt="${var_pihole_unbound:-}" +[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add Unbound? " prompt if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then - 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? " prompt + 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? " prompt msg_info "Installing Unbound" mkdir -p /etc/unbound/unbound.conf.d cat </etc/unbound/unbound.conf.d/pi-hole.conf diff --git a/install/podman-homeassistant-install.sh b/install/podman-homeassistant-install.sh index 7b8f81563..abd971901 100644 --- a/install/podman-homeassistant-install.sh +++ b/install/podman-homeassistant-install.sh @@ -48,7 +48,8 @@ msg_ok "Installed Podman" mkdir -p /etc/containers/systemd -read -r -p "${TAB3}Would you like to add Portainer? " prompt +prompt="${var_podman_homeassistant_portainer:-}" +[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add Portainer? " prompt if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then msg_info "Installing Portainer $PORTAINER_LATEST_VERSION" podman volume create portainer_data >/dev/null @@ -75,7 +76,8 @@ EOF $STD systemctl start portainer msg_ok "Installed Portainer $PORTAINER_LATEST_VERSION" else - read -r -p "${TAB3}Would you like to add the Portainer Agent? " prompt + prompt="${var_podman_homeassistant_portainer_agent:-}" + [[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add the Portainer Agent? " prompt if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then msg_info "Installing Portainer agent $PORTAINER_AGENT_LATEST_VERSION" cat </etc/containers/systemd/portainer-agent.container diff --git a/install/podman-install.sh b/install/podman-install.sh index 64fe3ef97..0ecc33717 100644 --- a/install/podman-install.sh +++ b/install/podman-install.sh @@ -48,7 +48,8 @@ msg_ok "Installed Podman" mkdir -p /etc/containers/systemd -read -r -p "${TAB3}Would you like to add Portainer? " prompt +prompt="${var_podman_portainer:-}" +[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add Portainer? " prompt if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then msg_info "Installing Portainer $PORTAINER_LATEST_VERSION" podman volume create portainer_data >/dev/null @@ -76,7 +77,8 @@ EOF $STD systemctl start portainer msg_ok "Installed Portainer $PORTAINER_LATEST_VERSION" else - read -r -p "${TAB3}Would you like to add the Portainer Agent? " prompt + prompt="${var_podman_portainer_agent:-}" + [[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add the Portainer Agent? " prompt if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then msg_info "Installing Portainer agent $PORTAINER_AGENT_LATEST_VERSION" $STD podman pull docker.io/portainer/agent:latest diff --git a/install/postgresql-install.sh b/install/postgresql-install.sh index 4a32ac3fa..bd1db865f 100644 --- a/install/postgresql-install.sh +++ b/install/postgresql-install.sh @@ -124,7 +124,8 @@ EOF systemctl restart postgresql msg_ok "Installed PostgreSQL" - read -r -p "${TAB3}Would you like to add Adminer? " prompt + prompt="${var_postgresql_adminer:-}" + [[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add Adminer? " prompt if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then msg_info "Installing Adminer" $STD apt install -y adminer @@ -158,7 +159,8 @@ setup_alpine() { $STD rc-service postgresql restart msg_ok "Configured and Restarted PostgreSQL" - read -r -p "${TAB3}Would you like to install Adminer with lighttpd? : " prompt + prompt="${var_postgresql_adminer:-}" + [[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to install Adminer with lighttpd? : " prompt if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then msg_info "Installing Adminer and dependencies" $STD apk add --no-cache \ diff --git a/install/sabnzbd-install.sh b/install/sabnzbd-install.sh index df8542149..a1ad71161 100644 --- a/install/sabnzbd-install.sh +++ b/install/sabnzbd-install.sh @@ -40,7 +40,8 @@ $STD uv venv --clear /opt/sabnzbd/venv $STD uv pip install -r /opt/sabnzbd/requirements.txt --python=/opt/sabnzbd/venv/bin/python msg_ok "Installed SABnzbd" -read -r -p "Would you like to install par2cmdline-turbo? " prompt +prompt="${var_sabnzbd_par2_turbo:-}" +[[ -n "$prompt" ]] || read -r -p "Would you like to install par2cmdline-turbo? " 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" diff --git a/install/silverbullet-install.sh b/install/silverbullet-install.sh index 26f769c16..ae04633d2 100644 --- a/install/silverbullet-install.sh +++ b/install/silverbullet-install.sh @@ -17,7 +17,8 @@ fetch_and_deploy_gh_release "silverbullet" "silverbulletmd/silverbullet" "prebui mkdir -p /opt/silverbullet/space RUNTIME_API_ENV="" -read -rp "${TAB3}Enable Silverbullet Runtime API? Requires Chromium (~700MB). Uses ~200MB extra RAM. (y/N): " runtime_api_prompt +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 if [[ "${runtime_api_prompt,,}" =~ ^(y|yes)$ ]]; then msg_info "Installing Chromium for Runtime API" $STD apt install -y chromium diff --git a/install/slskd-install.sh b/install/slskd-install.sh index 5a49fb1d0..45d63683f 100644 --- a/install/slskd-install.sh +++ b/install/slskd-install.sh @@ -36,7 +36,8 @@ sed -i \ -e 's/^.*picture/#&/' /opt/slskd/config/slskd.yml msg_ok "Configured Slskd" -read -rp "${TAB3}Do you want to install Soularr? y/N " soularr +soularr="${var_slskd_soularr:-}" +[[ -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" diff --git a/install/stirling-pdf-install.sh b/install/stirling-pdf-install.sh index ad8c0dae3..e0c7d5c4a 100644 --- a/install/stirling-pdf-install.sh +++ b/install/stirling-pdf-install.sh @@ -34,7 +34,8 @@ msg_ok "Installed Dependencies" PYTHON_VERSION="3.12" setup_uv JAVA_VERSION="25" setup_java -if ! read -r -p "${TAB3}Do you want to use Stirling-PDF with Login? (no/n = without Login) [Y/n] " response; then +response="${var_stirling_pdf_login:-}" +if [[ -z "$response" ]] && ! read -r -p "${TAB3}Do you want to use Stirling-PDF with Login? (no/n = without Login) [Y/n] " response; then # No interactive stdin (EOF): fall back to the no-login install instead of # silently selecting login, which the -z test below would otherwise do. response="n" diff --git a/install/traefik-install.sh b/install/traefik-install.sh index f051a3f99..e07dc919c 100644 --- a/install/traefik-install.sh +++ b/install/traefik-install.sh @@ -105,8 +105,9 @@ setup_alpine() { $STD apk add traefik --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community msg_ok "Installed Traefik" - read -p "${TAB3}Enable Traefik WebUI (Port 8080)? [y/N]: " enable_webui - if [[ "$enable_webui" =~ ^[Yy]$ ]]; then + enable_webui="${var_traefik_webui:-}" + [[ -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 msg_ok "Configured Traefik WebUI" diff --git a/install/valkey-install.sh b/install/valkey-install.sh index f304ad276..a7fde9afb 100644 --- a/install/valkey-install.sh +++ b/install/valkey-install.sh @@ -36,9 +36,11 @@ setup_deb_based() { msg_ok "Installed Valkey" echo - read -r -p "${TAB3}Enable TLS for Valkey (Sentinel mode does not supported)? [y/N]: " prompt + prompt="${var_valkey_tls:-}" + [[ -n "$prompt" ]] || read -r -p "${TAB3}Enable TLS for Valkey (Sentinel mode does not supported)? [y/N]: " prompt if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then - read -r -p "${TAB3}Use TLS-only mode (disable TCP port 6379)? [y/N]: " tls_only + 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 msg_info "Configuring TLS for Valkey..." create_self_signed_cert "Valkey" diff --git a/install/versitygw-install.sh b/install/versitygw-install.sh index 36c1b6a3e..40e84c2a2 100644 --- a/install/versitygw-install.sh +++ b/install/versitygw-install.sh @@ -16,7 +16,8 @@ update_os fetch_and_deploy_gh_release "versitygw" "versity/versitygw" "binary" WEBUI_CONF="" -read -rp "Would you like to enable the VersityGW WebGUI (Beta)? (y/N): " webui_prompt +webui_prompt="${var_versitygw_webgui:-}" +[[ -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" diff --git a/install/victoriametrics-install.sh b/install/victoriametrics-install.sh index fefe732ca..b61894bf2 100644 --- a/install/victoriametrics-install.sh +++ b/install/victoriametrics-install.sh @@ -27,7 +27,8 @@ msg_ok "Got version $victoriametrics_release of VictoriaMetrics" fetch_and_deploy_gh_release "victoriametrics" "VictoriaMetrics/VictoriaMetrics" "prebuild" "$victoriametrics_release" "/opt/victoriametrics" "$victoriametrics_filename" fetch_and_deploy_gh_release "vmutils" "VictoriaMetrics/VictoriaMetrics" "prebuild" "$victoriametrics_release" "/opt/victoriametrics" "$vmutils_filename" -read -r -p "${TAB3}Would you like to add VictoriaLogs? " prompt +prompt="${var_victoriametrics_logs:-}" +[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add VictoriaLogs? " prompt if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then vl_release_json="$(mktemp)" diff --git a/install/wireguard-install.sh b/install/wireguard-install.sh index 93a2d7ffd..3ee7a6152 100644 --- a/install/wireguard-install.sh +++ b/install/wireguard-install.sh @@ -24,7 +24,8 @@ setup_deb_based() { $STD netfilter-persistent reload msg_ok "Installed WireGuard" - read -r -p "${TAB3}Would you like to add WGDashboard? " prompt + prompt="${var_wireguard_wgdashboard:-}" + [[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add WGDashboard? " prompt if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then git clone -q https://github.com/WGDashboard/WGDashboard.git /etc/wgdashboard @@ -109,8 +110,9 @@ EOF $STD sysctl -p /etc/sysctl.conf msg_ok "Installed WireGuard" - read -rp "${TAB3}Do you want to install WGDashboard? (y/N): " INSTALL_WGD - if [[ "$INSTALL_WGD" =~ ^[Yy]$ ]]; then + INSTALL_WGD="${var_wireguard_wgdashboard:-}" + [[ -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 \ python3 \