diff --git a/install/apache-tomcat-install.sh b/install/apache-tomcat-install.sh index 73b2bc169..b2e36959c 100644 --- a/install/apache-tomcat-install.sh +++ b/install/apache-tomcat-install.sh @@ -13,12 +13,14 @@ setting_up_container network_check update_os -read -r -p "${TAB3}Which Tomcat version would you like to install? (9, 10.1, 11): " version +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:-}" case $version in 9) TOMCAT_VERSION="9" echo "Which LTS Java version would you like to use? (8, 11, 17, 21): " - read -r jdk_version + [[ -n "$jdk_version" ]] || read -r jdk_version || true case $jdk_version in 8 | 11 | 17 | 21) JAVA_VERSION="$jdk_version" setup_java @@ -32,7 +34,7 @@ case $version in 10 | 10.1) TOMCAT_VERSION="10" echo "Which LTS Java version would you like to use? (11, 17, 21): " - read -r jdk_version + [[ -n "$jdk_version" ]] || read -r jdk_version || true case $jdk_version in 11 | 17 | 21) JAVA_VERSION="$jdk_version" setup_java @@ -46,7 +48,7 @@ case $version in 11) TOMCAT_VERSION="11" echo "Which LTS Java version would you like to use? (17, 21): " - read -r jdk_version + [[ -n "$jdk_version" ]] || read -r jdk_version || true case $jdk_version in 17 | 21) JAVA_VERSION="$jdk_version" setup_java diff --git a/install/aria2-install.sh b/install/aria2-install.sh index cdc65c06b..ce5cba34f 100644 --- a/install/aria2-install.sh +++ b/install/aria2-install.sh @@ -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? " prompt +[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add AriaNG? " prompt || true if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then msg_info "Installing Dependencies" $STD apt install -y nginx diff --git a/install/asterisk-install.sh b/install/asterisk-install.sh index 6ade65da5..f74a04ddd 100644 --- a/install/asterisk-install.sh +++ b/install/asterisk-install.sh @@ -47,7 +47,8 @@ Choose Asterisk version to install: 2) Latest LTS ($LTS_VERSION) 3) Latest Certified ($CERT_VERSION) EOF -read -rp "Enter choice [1-3]: " ASTERISK_CHOICE +ASTERISK_CHOICE="${var_asterisk_version:-}" +[[ -n "$ASTERISK_CHOICE" ]] || read -rp "Enter choice [1-3]: " ASTERISK_CHOICE || true CERTIFIED=0 case "$ASTERISK_CHOICE" in diff --git a/install/authelia-install.sh b/install/authelia-install.sh index aceb2bbf3..dbf8a9fcb 100644 --- a/install/authelia-install.sh +++ b/install/authelia-install.sh @@ -17,9 +17,10 @@ fetch_and_deploy_gh_release "authelia" "authelia/authelia" "binary" MAX_ATTEMPTS=3 attempt=0 +DOMAIN="${var_authelia_domain:-}" while true; do attempt=$((attempt + 1)) - read -rp "${TAB3}Enter your domain or IP (ex. example.com or 192.168.1.100): " DOMAIN + [[ -n "$DOMAIN" ]] || read -rp "${TAB3}Enter your domain or IP (ex. example.com or 192.168.1.100): " DOMAIN || true if [[ -z "$DOMAIN" ]]; then if ((attempt >= MAX_ATTEMPTS)); then DOMAIN="${LOCAL_IP:-localhost}" @@ -40,11 +41,13 @@ 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" diff --git a/install/bichon-install.sh b/install/bichon-install.sh index ce197056d..75c33c98e 100644 --- a/install/bichon-install.sh +++ b/install/bichon-install.sh @@ -15,7 +15,8 @@ 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" -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 +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 if [[ -z "$bichon_url" ]]; then msg_info "No URL provided" BICHON_PUBLIC_URL="http://$LOCAL_IP:15630" diff --git a/install/bitmagnet-install.sh b/install/bitmagnet-install.sh index 9eea89757..fa4d921ac 100644 --- a/install/bitmagnet-install.sh +++ b/install/bitmagnet-install.sh @@ -34,7 +34,8 @@ setup_deb_based() { chmod +x bitmagnet msg_ok "Configured bitmagnet" - read -r -p "${TAB3}Enter your TMDB API key if you have one: " tmdbapikey + tmdbapikey="${var_bitmagnet_tmdb_api_key:-}" + [[ -n "$tmdbapikey" ]] || read -r -p "${TAB3}Enter your TMDB API key if you have one: " tmdbapikey || true cat </etc/bitmagnet.env POSTGRES_HOST=localhost @@ -99,7 +100,8 @@ setup_alpine() { $STD su - postgres -c "psql -c 'CREATE DATABASE bitmagnet;'" msg_ok "Built bitmagnet" - read -rp "${TAB3}Enter your TMDB API key if you have one: " tmdbapikey + tmdbapikey="${var_bitmagnet_tmdb_api_key:-}" + [[ -n "$tmdbapikey" ]] || read -rp "${TAB3}Enter your TMDB API key if you have one: " tmdbapikey || true msg_info "Enabling bitmagnet Service" cat </etc/init.d/bitmagnet diff --git a/install/bytestash-install.sh b/install/bytestash-install.sh index 5b24cca92..ff6688cc0 100644 --- a/install/bytestash-install.sh +++ b/install/bytestash-install.sh @@ -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 +[[ -n "$allowreg" ]] || read -rp "${TAB3}Do you want to allow registration of multiple accounts? [y/n]: " allowreg || true msg_info "Creating Service" cat </etc/systemd/system/bytestash-backend.service diff --git a/install/caddy-install.sh b/install/caddy-install.sh index 1d24c405d..1f20e7678 100644 --- a/install/caddy-install.sh +++ b/install/caddy-install.sh @@ -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? " prompt + [[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to install xCaddy Addon? " prompt || true 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? " prompt + [[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to install xCaddy Addon? " prompt || true 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/cloudflare-ddns-install.sh b/install/cloudflare-ddns-install.sh index 18659bbd7..4e7918035 100644 --- a/install/cloudflare-ddns-install.sh +++ b/install/cloudflare-ddns-install.sh @@ -13,15 +13,18 @@ setting_up_container network_check update_os -var_cf_api_token="default" -read -rp "${TAB3}Enter the Cloudflare API token: " var_cf_api_token +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_domains="default" -read -rp "${TAB3}Enter the domains separated with a comma (*.example.org,www.example.org) " var_cf_domains +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_proxied="false" +answer="${var_cloudflare_ddns_proxied:-}" while true; do - read -rp "${TAB3}Proxied? (y/n): " answer + [[ -n "$answer" ]] || read -rp "${TAB3}Proxied? (y/n): " answer || answer="n" case "$answer" in [Yy]*) var_cf_proxied="true" @@ -31,12 +34,13 @@ while true; do var_cf_proxied="false" break ;; - *) echo "Please answer y or n." ;; + *) echo "Please answer y or n."; answer="" ;; esac done var_cf_ip6_provider="none" +answer="${var_cloudflare_ddns_ipv6:-}" while true; do - read -rp "${TAB3}Enable IPv6 support? (y/n): " answer + [[ -n "$answer" ]] || read -rp "${TAB3}Enable IPv6 support? (y/n): " answer || answer="n" case "$answer" in [Yy]*) var_cf_ip6_provider="cloudflare.trace" @@ -46,7 +50,7 @@ while true; do var_cf_ip6_provider="none" break ;; - *) echo "Please answer y or n." ;; + *) echo "Please answer y or n."; answer="" ;; esac done msg_ok "Configured Application" diff --git a/install/cockpit-install.sh b/install/cockpit-install.sh index 5a59316df..1efb4de37 100644 --- a/install/cockpit-install.sh +++ b/install/cockpit-install.sh @@ -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 " prompt + [[ -n "$prompt" ]] || read -r -p "Would you like to install 45Drives' cockpit-file-sharing, cockpit-identities, and cockpit-navigator " prompt || true fi if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then msg_info "Installing 45Drives' cockpit extensions" diff --git a/install/comfyui-install.sh b/install/comfyui-install.sh index f1c378c5c..d0ceaa49a 100644 --- a/install/comfyui-install.sh +++ b/install/comfyui-install.sh @@ -17,7 +17,8 @@ setup_hwaccel echo echo "${TAB3}Choose the GPU type for ComfyUI:" echo "${TAB3}[1]-None [2]-NVIDIA [3]-AMD [4]-Intel" -read -rp "${TAB3}Enter your choice [1-4] (default: 1): " gpu_choice +gpu_choice="${var_comfyui_gpu_type:-}" +[[ -n "$gpu_choice" ]] || read -rp "${TAB3}Enter your choice [1-4] (default: 1): " gpu_choice || true gpu_choice=${gpu_choice:-1} case "$gpu_choice" in 1) comfyui_gpu_type="none" ;; diff --git a/install/cryptpad-install.sh b/install/cryptpad-install.sh index 323602f90..42a384ec1 100644 --- a/install/cryptpad-install.sh +++ b/install/cryptpad-install.sh @@ -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 +[[ -n "$onlyoffice" ]] || read -rp "${TAB3}Install OnlyOffice components instead of CKEditor? (Y/N): " onlyoffice || true fetch_and_deploy_gh_release "cryptpad" "cryptpad/cryptpad" "tarball" msg_info "Setup CryptPad" diff --git a/install/docker-install.sh b/install/docker-install.sh index 9debc98ae..4c2961d45 100644 --- a/install/docker-install.sh +++ b/install/docker-install.sh @@ -15,11 +15,8 @@ update_os setup_deb_based() { setup_docker - 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)] : " socket_choice - fi + 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)] : " socket_choice || true case "${socket_choice,,}" in l | local) socket="tcp://127.0.0.1:2375" @@ -70,11 +67,8 @@ setup_alpine() { msg_ok "Installed Docker" DOCKER_COMPOSE_LATEST_VERSION=$(get_latest_github_release "docker/compose" false) - if [[ -n "${var_docker_compose:-}" ]]; then - prompt="$var_docker_compose" - else - read -r -p "${TAB3}Would you like to add Docker Compose? " prompt - fi + prompt="${var_docker_compose:-}" + [[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add Docker Compose? " prompt || true if [[ "${prompt,,}" =~ ^(y|yes|true)$ ]]; then msg_info "Installing Docker Compose $DOCKER_COMPOSE_LATEST_VERSION" DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker} @@ -83,11 +77,8 @@ setup_alpine() { chmod +x "$DOCKER_CONFIG"/cli-plugins/docker-compose msg_ok "Installed Docker Compose $DOCKER_COMPOSE_LATEST_VERSION" fi - if [[ -n "${var_docker_socket:-}" ]]; then - prompt="$var_docker_socket" - else - read -r -p "${TAB3}Would you like to expose the Docker TCP socket? " prompt - fi + prompt="${var_docker_socket:-}" + [[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to expose the Docker TCP socket? " prompt || true case "${prompt,,}" in y | yes | a | all) socket="tcp://0.0.0.0:2375" ;; l | local) socket="tcp://127.0.0.1:2375" ;; diff --git a/install/dotnetaspwebapi-install.sh b/install/dotnetaspwebapi-install.sh index f67f78e93..4baab89f5 100644 --- a/install/dotnetaspwebapi-install.sh +++ b/install/dotnetaspwebapi-install.sh @@ -26,8 +26,9 @@ $STD apt install -y \ nginx msg_ok "Installed Dependencies" -var_project_name="default" -read -r -p "${TAB3}Type the assembly name of the project: " var_project_name +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; } msg_info "Setting up FTP Server" useradd ftpuser diff --git a/install/elementsynapse-install.sh b/install/elementsynapse-install.sh index 3c1689680..3ad0d8ca8 100644 --- a/install/elementsynapse-install.sh +++ b/install/elementsynapse-install.sh @@ -23,7 +23,9 @@ 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." -read -p "${TAB3}Please enter the name for your server: " servername +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; } msg_info "Installing Element Synapse" setup_deb822_repo "matrix-org" \ diff --git a/install/emqx-install.sh b/install/emqx-install.sh index 7c7ed9cf6..0f7f44c7e 100644 --- a/install/emqx-install.sh +++ b/install/emqx-install.sh @@ -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) " prompt +[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to disable the EMQX MQ feature? (reduces disk/CPU usage) " prompt || true if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then msg_info "Disabling EMQX MQ feature" mkdir -p /etc/emqx diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh index fbb623ae1..0aa3cf08b 100644 --- a/install/fileflows-install.sh +++ b/install/fileflows-install.sh @@ -45,7 +45,8 @@ $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-* -read -r -p "${TAB3}Do you want to install FileFlows Server or Agent? (S/A): " install_server +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 if [[ "$install_server" =~ ^[Ss]$ ]]; then msg_info "Installing FileFlows Server" @@ -54,9 +55,10 @@ if [[ "$install_server" =~ ^[Ss]$ ]]; then systemctl enable -q --now fileflows msg_ok "Installed FileFlows Server" else - read -r -p "${TAB3}Enter FileFlows Server URL (e.g. http://192.168.1.10:19200): " server_url + 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 while [[ -z "${server_url// /}" ]]; do - read -r -p "${TAB3}Enter FileFlows Server URL (e.g. http://192.168.1.10:19200): " server_url + 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; } done msg_info "Installing FileFlows Agent" cd /opt/fileflows/Agent diff --git a/install/forgejo-runner-install.sh b/install/forgejo-runner-install.sh index 23196c174..ca30d4ea1 100644 --- a/install/forgejo-runner-install.sh +++ b/install/forgejo-runner-install.sh @@ -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 + read -r -p "${TAB3}Forgejo Instance URL (e.g. https://codeberg.org): " var_forgejo_instance || true 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 + read -r -p "${TAB3}Forgejo Runner UUID: " var_forgejo_runner_uuid || true 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 + read -r -p "${TAB3}Forgejo Runner Token: " var_forgejo_runner_token || true 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 + read -r -p "${TAB3}Additional runner labels (comma-separated, or leave blank for default only): " var_runner_labels || true fi if [[ -n "${var_runner_labels:-}" ]]; then RUNNER_LABELS="${DEFAULT_RUNNER_LABELS},${var_runner_labels}" diff --git a/install/ghostfolio-install.sh b/install/ghostfolio-install.sh index 4595b07ee..6956f1265 100644 --- a/install/ghostfolio-install.sh +++ b/install/ghostfolio-install.sh @@ -51,8 +51,10 @@ 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 "" -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 +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 msg_info "Setting up Environment" cat </opt/ghostfolio/.env diff --git a/install/headscale-install.sh b/install/headscale-install.sh index 66b6d1329..67a25d188 100644 --- a/install/headscale-install.sh +++ b/install/headscale-install.sh @@ -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? " prompt +[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add headscale-admin UI? " prompt || true 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 f3e223e26..413b3f98a 100644 --- a/install/influxdb-install.sh +++ b/install/influxdb-install.sh @@ -21,7 +21,8 @@ setup_deb822_repo \ "stable" msg_ok "Set up InfluxDB Repository" -read -r -p "${TAB3}Which version of InfluxDB to install? (1, 2 or 3) " prompt +prompt="${var_influxdb_version:-}" +[[ -n "$prompt" ]] || read -r -p "${TAB3}Which version of InfluxDB to install? (1, 2 or 3) " prompt || true if [[ $prompt == "3" ]]; then INFLUX="3" elif [[ $prompt == "2" ]]; then @@ -51,7 +52,7 @@ fi msg_ok "Installed InfluxDB" prompt="${var_influxdb_telegraf:-}" -[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add Telegraf? " prompt +[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add Telegraf? " prompt || true if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then msg_info "Installing Telegraf" $STD apt install -y telegraf diff --git a/install/kometa-install.sh b/install/kometa-install.sh index 0b2e90578..15c269ee7 100644 --- a/install/kometa-install.sh +++ b/install/kometa-install.sh @@ -28,9 +28,15 @@ mkdir -p config/assets cp config/config.yml.template config/config.yml msg_ok "Setup Kometa" -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 +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; } 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 diff --git a/install/kutt-install.sh b/install/kutt-install.sh index 05526ec98..88dac043e 100644 --- a/install/kutt-install.sh +++ b/install/kutt-install.sh @@ -15,7 +15,8 @@ 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)" -read -rp "${TAB3}Enter your choice (default: i): " ssl_choice +ssl_choice="${var_kutt_ssl:-}" +[[ -n "$ssl_choice" ]] || read -rp "${TAB3}Enter your choice (default: i): " ssl_choice || true ssl_choice=${ssl_choice:-i} case "${ssl_choice,,}" in i) @@ -32,7 +33,9 @@ EOF msg_ok "Configured Caddy" ;; e) - read -r -p "${TAB3}Enter the hostname you want to use for Kutt (eg. kutt.example.com): " custom_host + 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; } if [[ "$custom_host" ]]; then DEFAULT_HOST="$custom_host" fi diff --git a/install/languagetool-install.sh b/install/languagetool-install.sh index 224bd1515..b545a6f68 100644 --- a/install/languagetool-install.sh +++ b/install/languagetool-install.sh @@ -29,12 +29,12 @@ rm -f /tmp/LanguageTool-stable.zip msg_ok "Setup LanguageTool" ngram_dir="" -lang_code="" +lang_code="${var_languagetool_ngram_lang:-}" max_attempts=3 attempt=0 while [[ $attempt -lt $max_attempts ]]; do - read -r -p "${TAB3}Enter language code (en, de, es, fr, nl) to download ngrams or press ENTER to skip: " lang_code + [[ -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="" 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 diff --git a/install/linkwarden-install.sh b/install/linkwarden-install.sh index 6350938fb..5ed5aa57f 100644 --- a/install/linkwarden-install.sh +++ b/install/linkwarden-install.sh @@ -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? " prompt +[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add Adminer? " prompt || true if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then setup_adminer fi diff --git a/install/mariadb-install.sh b/install/mariadb-install.sh index a9d0a3025..f773c290a 100644 --- a/install/mariadb-install.sh +++ b/install/mariadb-install.sh @@ -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? " prompt + [[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add PhpMyAdmin? " prompt || true 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? : " prompt + [[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to install Adminer with lighttpd? : " prompt || true if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then msg_info "Installing Adminer and dependencies" $STD apk add --no-cache \ diff --git a/install/mediamanager-install.sh b/install/mediamanager-install.sh index 3419ac30e..e234e2941 100644 --- a/install/mediamanager-install.sh +++ b/install/mediamanager-install.sh @@ -13,7 +13,9 @@ setting_up_container network_check update_os -read -r -p "${TAB3}Enter the email address of your first admin user: " admin_email +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; } if [[ "$admin_email" ]]; then EMAIL="$admin_email" fi diff --git a/install/meilisearch-install.sh b/install/meilisearch-install.sh index 6fe7fff77..9c084f623 100644 --- a/install/meilisearch-install.sh +++ b/install/meilisearch-install.sh @@ -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 +[[ -n "$prompt" ]] || read -r -p "${TAB3}Do you want add meilisearch-ui? [y/n]: " prompt || true 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/mongodb-install.sh b/install/mongodb-install.sh index 4c9d34f03..fcc221253 100644 --- a/install/mongodb-install.sh +++ b/install/mongodb-install.sh @@ -16,7 +16,8 @@ update_os if [[ "$(arch_resolve)" == "arm64" ]]; then MONGO_VERSION="8.0" setup_mongodb else - read -p "${TAB3}Do you want to install MongoDB 8.0 instead of 7.0? [y/N]: " install_mongodb_8 + 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]$ ]]; then MONGO_VERSION="8.0" setup_mongodb else diff --git a/install/mysql-install.sh b/install/mysql-install.sh index 06476fef6..ae417df22 100644 --- a/install/mysql-install.sh +++ b/install/mysql-install.sh @@ -21,7 +21,8 @@ msg_ok "Installed Dependencies" RELEASE_REPO="mysql-8.0" RELEASE_AUTH="mysql_native_password" -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)? " prompt +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)? " prompt || true if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then RELEASE_REPO="mysql-8.4-lts" RELEASE_AUTH="caching_sha2_password" @@ -61,7 +62,8 @@ echo -e "MySQL user: root" >>~/mysql.creds echo -e "MySQL password: $ADMIN_PASS" >>~/mysql.creds msg_ok "MySQL Server configured" -read -r -p "${TAB3}Would you like to add PhpMyAdmin? " prompt +prompt="${var_mysql_phpmyadmin:-}" +[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add PhpMyAdmin? " prompt || true if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/addon/phpmyadmin.sh)" fi diff --git a/install/netbird-install.sh b/install/netbird-install.sh index b296adf29..5a960bcd0 100644 --- a/install/netbird-install.sh +++ b/install/netbird-install.sh @@ -36,7 +36,8 @@ echo " 1) NetBird Managed (default) - Use NetBird's managed service" echo " 2) Self-Hosted - Use your own NetBird management server" echo "" -read -r -p "${TAB3}Select deployment type [1]: " DEPLOYMENT_TYPE +DEPLOYMENT_TYPE="${var_netbird_deployment:-}" +[[ -n "$DEPLOYMENT_TYPE" ]] || read -r -p "${TAB3}Select deployment type [1]: " DEPLOYMENT_TYPE || true DEPLOYMENT_TYPE="${DEPLOYMENT_TYPE:-1}" NETBIRD_MGMT_URL="" @@ -51,7 +52,8 @@ case "$DEPLOYMENT_TYPE" in echo "Enter your NetBird management server URL." echo "Example: https://management.example.com" echo "" - read -r -p "Management URL: " NETBIRD_MGMT_URL + NETBIRD_MGMT_URL="${var_netbird_mgmt_url:-}" + [[ -n "$NETBIRD_MGMT_URL" ]] || read -r -p "Management URL: " NETBIRD_MGMT_URL || true if [[ -z "$NETBIRD_MGMT_URL" ]]; then msg_warn "No management URL provided. Run 'netbird up --management-url ' to connect." @@ -81,7 +83,8 @@ else fi echo "" -read -r -p "Select authentication method [1]: " AUTH_METHOD +AUTH_METHOD="${var_netbird_auth:-}" +[[ -n "$AUTH_METHOD" ]] || read -r -p "Select authentication method [1]: " AUTH_METHOD || true AUTH_METHOD="${AUTH_METHOD:-1}" if [[ "$DEPLOYMENT_TYPE" == "1" ]]; then @@ -90,7 +93,8 @@ if [[ "$DEPLOYMENT_TYPE" == "1" ]]; then echo "" echo "Enter your NetBird setup key from the NetBird dashboard." echo "" - read -r -p "Setup key: " NETBIRD_SETUP_KEY + NETBIRD_SETUP_KEY="${var_netbird_setup_key:-}" + [[ -n "$NETBIRD_SETUP_KEY" ]] || read -r -p "Setup key: " NETBIRD_SETUP_KEY || true echo "" if [[ -z "$NETBIRD_SETUP_KEY" ]]; then @@ -136,7 +140,8 @@ else echo "" echo "Enter your NetBird setup key from the NetBird dashboard." echo "" - read -r -p "Setup key: " NETBIRD_SETUP_KEY + NETBIRD_SETUP_KEY="${var_netbird_setup_key:-}" + [[ -n "$NETBIRD_SETUP_KEY" ]] || read -r -p "Setup key: " NETBIRD_SETUP_KEY || true echo "" if [[ -z "$NETBIRD_SETUP_KEY" ]]; then diff --git a/install/newt-install.sh b/install/newt-install.sh index 39fed2067..4374dafcb 100644 --- a/install/newt-install.sh +++ b/install/newt-install.sh @@ -16,16 +16,15 @@ 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 -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 +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 echo fi -if [[ -z "${PANGOLIN_ENDPOINT:-}" ]]; then - read -rp "Pangolin endpoint (e.g. https://pangolin.example.com): " PANGOLIN_ENDPOINT -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 "$NEWT_ID" || -z "$NEWT_SECRET" || -z "$PANGOLIN_ENDPOINT" ]]; then msg_error "Newt ID, Secret and Endpoint are all required. Aborting." diff --git a/install/npmplus-install.sh b/install/npmplus-install.sh index dbaabf863..9b2cefa10 100644 --- a/install/npmplus-install.sh +++ b/install/npmplus-install.sh @@ -38,12 +38,14 @@ 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 - read -r -p "${TAB3}Enter your TZ Identifier (e.g., Europe/Berlin): " TZ_INPUT + [[ -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; } 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 @@ -52,7 +54,9 @@ while true; do fi done -read -r -p "${TAB3}Enter your ACME Email: " ACME_EMAIL_INPUT +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; } yq -i " .services.npmplus.environment |= diff --git a/install/opencloud-install.sh b/install/opencloud-install.sh index 98b910d06..bd721c9a5 100644 --- a/install/opencloud-install.sh +++ b/install/opencloud-install.sh @@ -17,19 +17,23 @@ 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)) - read -rp "${TAB3}Enter the FQDN of your ${server^} server (ATTEMPT $attempt/$MAX_ATTEMPTS) (eg $server.domain.tld): " fqdn + [[ -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; } 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 diff --git a/install/openwebui-install.sh b/install/openwebui-install.sh index 644ab15a0..6013da9c5 100644 --- a/install/openwebui-install.sh +++ b/install/openwebui-install.sh @@ -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)? " prompt +[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to install OpenTelemetry instrumentation packages (requires manual .env configuration)? " prompt || true 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? " prompt +[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add Ollama? " prompt || true if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then if [[ "$(arch_resolve)" == "amd64" ]]; then msg_info "Setting up Intel® Repositories" diff --git a/install/openziti-controller-install.sh b/install/openziti-controller-install.sh index 9af0bf877..ca6836adb 100644 --- a/install/openziti-controller-install.sh +++ b/install/openziti-controller-install.sh @@ -27,17 +27,22 @@ apt_update_safe $STD apt install -y openziti-controller openziti-console " prompt +prompt="${var_openziti_controller_autoconfig:-}" +[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to go through the auto configuration now? " prompt || true if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then GEN_FQDN="controller.${LOCAL_IP}.sslip.io" - read -r -p "${TAB3}Please enter the controller FQDN [${GEN_FQDN}]: " ZITI_CTRL_ADVERTISED_ADDRESS + 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 ZITI_CTRL_ADVERTISED_ADDRESS=${ZITI_CTRL_ADVERTISED_ADDRESS:-$GEN_FQDN} - read -r -p "${TAB3}Please enter the controller port [1280]: " ZITI_CTRL_ADVERTISED_PORT + 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 ZITI_CTRL_ADVERTISED_PORT=${ZITI_CTRL_ADVERTISED_PORT:-1280} - read -r -p "${TAB3}Please enter the controller admin user [admin]: " ZITI_USER + ZITI_USER="${var_openziti_controller_user:-}" + [[ -n "$ZITI_USER" ]] || read -r -p "${TAB3}Please enter the controller admin user [admin]: " ZITI_USER || true ZITI_USER=${ZITI_USER:-admin} GEN_PWD=$(head -c128 /dev/urandom | LC_ALL=C tr -dc 'A-Za-z0-9!@#$%^*_+~' | cut -c 1-12) - read -r -p "${TAB3}Please enter the controller admin password [${GEN_PWD}]:" ZITI_PWD + ZITI_PWD="${var_openziti_controller_password:-}" + [[ -n "$ZITI_PWD" ]] || read -r -p "${TAB3}Please enter the controller admin password [${GEN_PWD}]:" ZITI_PWD || true 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" diff --git a/install/openziti-tunnel-install.sh b/install/openziti-tunnel-install.sh index 21074022d..aa46ca253 100644 --- a/install/openziti-tunnel-install.sh +++ b/install/openziti-tunnel-install.sh @@ -29,7 +29,8 @@ sed -i '0,/^ExecStart/ { /^ExecStart/ { n; s|^ExecStart.*|ExecStart=/opt/openzit systemctl daemon-reload msg_ok "Installed openziti" -read -r -p "${TAB3}Please paste an identity enrollment token(JTW)" prompt +prompt="${var_openziti_tunnel_enrollment_token:-}" +[[ -n "$prompt" ]] || read -r -p "${TAB3}Please paste an identity enrollment token(JTW)" prompt || true if [[ ${prompt} ]]; then msg_info "Adding identity" echo "${prompt}" >/opt/openziti/etc/identities/identity.jwt diff --git a/install/pangolin-install.sh b/install/pangolin-install.sh index 68238b033..f66cc4df1 100644 --- a/install/pangolin-install.sh +++ b/install/pangolin-install.sh @@ -27,15 +27,13 @@ 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:-}" -if [[ -z "$pango_url" ]]; then - read -rp "${TAB3}Enter your Pangolin URL (ex: https://pangolin.example.com): " pango_url -fi +[[ -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; } [[ "$pango_url" != https://* && "$pango_url" != http://* ]] && pango_url="https://${pango_url}" pango_email="${var_pangolin_email:-}" -if [[ -z "$pango_email" ]]; then - read -rp "${TAB3}Enter your email address: " pango_email -fi +[[ -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; } msg_info "Setup Pangolin" SECRET_KEY=$(random_password 32) diff --git a/install/paperless-gpt-install.sh b/install/paperless-gpt-install.sh index 47228b4ef..239a5579a 100644 --- a/install/paperless-gpt-install.sh +++ b/install/paperless-gpt-install.sh @@ -38,16 +38,22 @@ CGO_ENABLED=1 go build -tags musl -o paperless-gpt . msg_ok "Setup Paperless-GPT" mkdir -p /opt/paperless-gpt-data -read -rp "${TAB3}Do you want to enter the Paperless local URL now? (y/n) " input_url +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]$ ]]; then - read -rp "${TAB3}Enter your Paperless-NGX instance URL (e.g., http://192.168.1.100:8000): " PAPERLESS_BASE_URL + 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; } else PAPERLESS_BASE_URL="http://your_paperless_ngx_url" fi -read -rp "${TAB3}Do you want to enter the Paperless API token now? (y/n) " input_token +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]$ ]]; then - read -rp "${TAB3}Enter your Paperless API token: " PAPERLESS_API_TOKEN + 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; } else PAPERLESS_API_TOKEN="your_paperless_api_token" fi diff --git a/install/paperless-ngx-install.sh b/install/paperless-ngx-install.sh index 812313608..d680dc531 100644 --- a/install/paperless-ngx-install.sh +++ b/install/paperless-ngx-install.sh @@ -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? " prompt +[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add Adminer? " prompt || true if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then setup_adminer fi diff --git a/install/pihole-install.sh b/install/pihole-install.sh index fdc882bc8..29d31dc17 100644 --- a/install/pihole-install.sh +++ b/install/pihole-install.sh @@ -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? " prompt +[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add Unbound? " prompt || true 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? " prompt + [[ -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 || true msg_info "Installing Unbound" mkdir -p /etc/unbound/unbound.conf.d cat </etc/unbound/unbound.conf.d/pi-hole.conf diff --git a/install/pocketid-install.sh b/install/pocketid-install.sh index 11b8fa591..58ca6afeb 100644 --- a/install/pocketid-install.sh +++ b/install/pocketid-install.sh @@ -13,7 +13,9 @@ setting_up_container network_check update_os -read -r -p "${TAB3}What public URL do you want to use (e.g. pocketid.mydomain.com)? " public_url +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; } 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" diff --git a/install/podman-homeassistant-install.sh b/install/podman-homeassistant-install.sh index 368633b4e..4edde9074 100644 --- a/install/podman-homeassistant-install.sh +++ b/install/podman-homeassistant-install.sh @@ -54,7 +54,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? " prompt +[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add Portainer? " prompt || true if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then msg_info "Installing Portainer $PORTAINER_LATEST_VERSION" podman volume create portainer_data >/dev/null @@ -82,7 +82,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? " prompt + [[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add the Portainer Agent? " prompt || true 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 0ecc33717..6661de3d1 100644 --- a/install/podman-install.sh +++ b/install/podman-install.sh @@ -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? " prompt +[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add Portainer? " prompt || true 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? " prompt + [[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add the Portainer Agent? " prompt || true 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/pterodactyl-panel-install.sh b/install/pterodactyl-panel-install.sh index 71de60220..ec9233707 100644 --- a/install/pterodactyl-panel-install.sh +++ b/install/pterodactyl-panel-install.sh @@ -47,9 +47,15 @@ msg_ok "Installed PHP" MARIADB_DB_NAME="panel" MARIADB_DB_USER="pterodactyl" MARIADB_DB_CREDS_FILE="$HOME/pterodactyl-panel.creds" setup_mariadb_db -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 +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; } fetch_and_deploy_gh_release "pterodactyl-panel" "pterodactyl/panel" "prebuild" "latest" "/opt/pterodactyl-panel" "panel.tar.gz" diff --git a/install/rustdeskserver-install.sh b/install/rustdeskserver-install.sh index cfcc3fb2f..9ff00d0a2 100644 --- a/install/rustdeskserver-install.sh +++ b/install/rustdeskserver-install.sh @@ -13,11 +13,8 @@ setting_up_container network_check update_os -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)? " prompt -fi +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)? " prompt || true INSTALL_API=0 [[ "${prompt,,}" =~ ^(y|yes|true)$ ]] && INSTALL_API=1 API_PASS="$(random_password 16)" diff --git a/install/sabnzbd-install.sh b/install/sabnzbd-install.sh index a1ad71161..6db27b035 100644 --- a/install/sabnzbd-install.sh +++ b/install/sabnzbd-install.sh @@ -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? " prompt +[[ -n "$prompt" ]] || read -r -p "Would you like to install par2cmdline-turbo? " prompt || true 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/shelfmark-install.sh b/install/shelfmark-install.sh index 8c5cfbf59..62eb428ca 100644 --- a/install/shelfmark-install.sh +++ b/install/shelfmark-install.sh @@ -47,7 +47,8 @@ echo " 3) Use an existing Flaresolverr/Byparr LXC" echo " 4) Disable captcha bypassing altogether (not recommended)" echo "" -read -r -p "${TAB3}Select deployment type [1]: " DEPLOYMENT_TYPE +DEPLOYMENT_TYPE="${var_shelfmark_deployment_type:-}" +[[ -n "$DEPLOYMENT_TYPE" ]] || read -r -p "${TAB3}Select deployment type [1]: " DEPLOYMENT_TYPE || true 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" @@ -69,7 +70,8 @@ case "$DEPLOYMENT_TYPE" in echo "Example: http://flaresoverr.homelab.lan:8191 or" echo "http://192.168.10.99:8191" echo "" - read -r -p "FlareSolverr/Byparr URL: " BYPASSER_URL + BYPASSER_URL="${var_shelfmark_bypasser_url:-}" + [[ -n "$BYPASSER_URL" ]] || read -r -p "FlareSolverr/Byparr URL: " BYPASSER_URL || true if [[ -z "$BYPASSER_URL" ]]; then msg_warn "No Flaresolverr/Byparr URL provided. Falling back to Shelfmark's internal bypasser." diff --git a/install/silverbullet-install.sh b/install/silverbullet-install.sh index ae04633d2..e4b5e2e55 100644 --- a/install/silverbullet-install.sh +++ b/install/silverbullet-install.sh @@ -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 +[[ -n "$runtime_api_prompt" ]] || read -rp "${TAB3}Enable Silverbullet Runtime API? Requires Chromium (~700MB). Uses ~200MB extra RAM. (y/N): " runtime_api_prompt || true 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 45d63683f..574e7cdfa 100644 --- a/install/slskd-install.sh +++ b/install/slskd-install.sh @@ -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 +[[ -n "$soularr" ]] || read -rp "${TAB3}Do you want to install Soularr? y/N " soularr || true 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/sqlserver2022-install.sh b/install/sqlserver2022-install.sh index 495622a9f..33454c806 100644 --- a/install/sqlserver2022-install.sh +++ b/install/sqlserver2022-install.sh @@ -46,7 +46,8 @@ echo 'export PATH="$PATH:/opt/mssql-tools18/bin"' >>~/.bash_profile source ~/.bash_profile msg_ok "Installed SQL Server Tools" -read -r -p "${TAB3}Do you want to run the SQL server setup now? (Later is also possible) " prompt +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) " prompt || true if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then /opt/mssql/bin/mssql-conf setup else diff --git a/install/sqlserver2025-install.sh b/install/sqlserver2025-install.sh index 1b6040575..f1020372e 100644 --- a/install/sqlserver2025-install.sh +++ b/install/sqlserver2025-install.sh @@ -46,7 +46,8 @@ echo 'export PATH="$PATH:/opt/mssql-tools18/bin"' >>~/.bash_profile source ~/.bash_profile msg_ok "Installed SQL Server Tools" -read -r -p "${TAB3}Do you want to run the SQL Server setup now? (Later is also possible) " prompt +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) " prompt || true if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then /opt/mssql/bin/mssql-conf setup else diff --git a/install/tinyauth-install.sh b/install/tinyauth-install.sh index 251a16398..1c8891ebb 100644 --- a/install/tinyauth-install.sh +++ b/install/tinyauth-install.sh @@ -32,7 +32,9 @@ Password: ${PASS} EOF msg_ok "Set up Tinyauth" - read -r -p "${TAB3}Enter your Tinyauth subdomain (e.g. https://tinyauth.example.com): " app_url + 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; } msg_info "Creating Service" cat </opt/tinyauth/.env @@ -77,7 +79,9 @@ Password: ${PASS} EOF msg_ok "Configured Tinyauth" - read -r -p "${TAB3}Enter your Tinyauth subdomain (e.g. https://tinyauth.example.com): " app_url + 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; } cat </opt/tinyauth/.env TINYAUTH_DATABASE_PATH=/opt/tinyauth/database.db diff --git a/install/traefik-install.sh b/install/traefik-install.sh index e07dc919c..8c5c4ff92 100644 --- a/install/traefik-install.sh +++ b/install/traefik-install.sh @@ -106,7 +106,7 @@ setup_alpine() { msg_ok "Installed Traefik" enable_webui="${var_traefik_webui:-}" - [[ -n "$enable_webui" ]] || read -p "${TAB3}Enable Traefik WebUI (Port 8080)? [y/N]: " enable_webui + [[ -n "$enable_webui" ]] || read -r -p "${TAB3}Enable Traefik WebUI (Port 8080)? [y/N]: " enable_webui || true if [[ "${enable_webui,,}" =~ ^(y|yes)$ ]]; then msg_info "Configuring Traefik WebUI" sed -i 's/localhost//g' /etc/traefik/traefik.yaml diff --git a/install/twingate-connector-install.sh b/install/twingate-connector-install.sh index f7f144eee..961a8743e 100644 --- a/install/twingate-connector-install.sh +++ b/install/twingate-connector-install.sh @@ -14,17 +14,17 @@ network_check update_os install -d -m 0700 /etc/twingate -access_token="" -refresh_token="" -network="" +access_token="${var_twingate_connector_access_token:-}" +refresh_token="${var_twingate_connector_refresh_token:-}" +network="${var_twingate_connector_network:-}" while [[ -z "$access_token" ]]; do - read -rp "${TAB3}Please enter your access token: " access_token + 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; } done while [[ -z "$refresh_token" ]]; do - read -rp "${TAB3}Please enter your refresh token: " refresh_token + 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; } done while [[ -z "$network" ]]; do - read -rp "${TAB3}Please enter your network name: " network + 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; } done msg_info "Setup Twingate Repository" diff --git a/install/valkey-install.sh b/install/valkey-install.sh index a7fde9afb..686d35f42 100644 --- a/install/valkey-install.sh +++ b/install/valkey-install.sh @@ -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 + [[ -n "$prompt" ]] || read -r -p "${TAB3}Enable TLS for Valkey (Sentinel mode does not supported)? [y/N]: " prompt || true 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 + [[ -n "$tls_only" ]] || read -r -p "${TAB3}Use TLS-only mode (disable TCP port 6379)? [y/N]: " tls_only || true msg_info "Configuring TLS for Valkey..." create_self_signed_cert "Valkey" diff --git a/install/versitygw-install.sh b/install/versitygw-install.sh index 40e84c2a2..9b10b6363 100644 --- a/install/versitygw-install.sh +++ b/install/versitygw-install.sh @@ -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 +[[ -n "$webui_prompt" ]] || read -rp "Would you like to enable the VersityGW WebGUI (Beta)? (y/N): " webui_prompt || true 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 b61894bf2..72fb1b43b 100644 --- a/install/victoriametrics-install.sh +++ b/install/victoriametrics-install.sh @@ -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? " prompt +[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add VictoriaLogs? " prompt || true if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then vl_release_json="$(mktemp)" diff --git a/install/wireguard-install.sh b/install/wireguard-install.sh index 3ee7a6152..14bf25fa7 100644 --- a/install/wireguard-install.sh +++ b/install/wireguard-install.sh @@ -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? " prompt + [[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add WGDashboard? " prompt || true 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 + [[ -n "$INSTALL_WGD" ]] || read -rp "${TAB3}Do you want to install WGDashboard? (y/N): " INSTALL_WGD || true if [[ "${INSTALL_WGD,,}" =~ ^(y|yes)$ ]]; then msg_info "Installing additional dependencies for WGDashboard" $STD apk add --no-cache \ diff --git a/install/zabbix-install.sh b/install/zabbix-install.sh index 562bb2d22..82a6f4b23 100644 --- a/install/zabbix-install.sh +++ b/install/zabbix-install.sh @@ -16,7 +16,8 @@ update_os PG_VERSION="17" setup_postgresql PG_DB_NAME="zabbixdb" PG_DB_USER="zabbix" setup_postgresql_db -read -rp "Choose Zabbix version [1] 7.0 LTS [2] 7.4 (Latest Stable) [3] Latest available (default: 2): " ZABBIX_CHOICE +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 ZABBIX_CHOICE=${ZABBIX_CHOICE:-2} case "$ZABBIX_CHOICE" in 1) ZABBIX_VERSION="7.0" ;; @@ -59,8 +60,9 @@ 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 - read -rp "Which agent do you want to install? [1=agent (classic), 2=agent2 (modern), default=1]: " AGENT_CHOICE + [[ -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" case "$AGENT_CHOICE" in 2) AGENT_PKG="zabbix-agent2" @@ -72,6 +74,7 @@ while true; do ;; *) echo "Invalid choice. Please enter 1 or 2." + AGENT_CHOICE="" ;; esac done @@ -81,7 +84,8 @@ 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)" - read -rp "Choose option [1-2]: " PLUGIN_CHOICE + PLUGIN_CHOICE="${var_zabbix_plugins:-}" + [[ -n "$PLUGIN_CHOICE" ]] || read -rp "Choose option [1-2]: " PLUGIN_CHOICE || true case "$PLUGIN_CHOICE" in 2)