diff --git a/.github/CONTRIBUTOR_AND_GUIDES/install/AppName-install.md b/.github/CONTRIBUTOR_AND_GUIDES/install/AppName-install.md index 45ddd92fd..cc63480fd 100644 --- a/.github/CONTRIBUTOR_AND_GUIDES/install/AppName-install.md +++ b/.github/CONTRIBUTOR_AND_GUIDES/install/AppName-install.md @@ -184,7 +184,7 @@ msg_info "Installing Dependencies" $STD apt-get install -y ... msg_ok "Installed Dependencies" -read -p "Do you wish to enable HTTPS mode? (y/N): " httpschoice +read -p "${TAB3}Do you wish to enable HTTPS mode? (y/N): " httpschoice ``` ### 6.2 **Verbosity** diff --git a/ct/homarr.sh b/ct/homarr.sh index 7af7fb52d..9d3a220a3 100644 --- a/ct/homarr.sh +++ b/ct/homarr.sh @@ -151,7 +151,7 @@ EOF systemctl start homarr msg_ok "Started Services" msg_ok "Updated Successfully" - read -p "It's recommended to reboot the LXC after an update, would you like to reboot the LXC now ? (y/n): " choice + read -p "${TAB3}It's recommended to reboot the LXC after an update, would you like to reboot the LXC now ? (y/n): " choice if [[ "$choice" =~ ^[Yy]$ ]]; then reboot fi diff --git a/ct/homeassistant-core.sh b/ct/homeassistant-core.sh index 098e887ef..339f7fa1c 100644 --- a/ct/homeassistant-core.sh +++ b/ct/homeassistant-core.sh @@ -114,7 +114,7 @@ function update_script() { if [ "$UPD" == "3" ]; then set +Eeuo pipefail - read -r -p "Would you like to use No Authentication? " prompt + read -r -p "${TAB3}Would you like to use No Authentication? " prompt msg_info "Installing FileBrowser" RELEASE=$(curl -fsSL https://api.github.com/repos/filebrowser/filebrowser/releases/latest | grep -o '"tag_name": ".*"' | sed 's/"//g' | sed 's/tag_name: //g') $STD curl -fsSL https://github.com/filebrowser/filebrowser/releases/download/$RELEASE/linux-amd64-filebrowser.tar.gz | tar -xzv -C /usr/local/bin diff --git a/install/alpine-docker-install.sh b/install/alpine-docker-install.sh index 97dbfb753..67b1b5c2a 100644 --- a/install/alpine-docker-install.sh +++ b/install/alpine-docker-install.sh @@ -29,13 +29,13 @@ $STD rc-update add docker default msg_ok "Installed Docker" get_latest_release() { - curl -fsSL https://api.github.com/repos/$1/releases/latest | grep '"tag_name":' | cut -d'"' -f4 + curl -fsSL https://api.github.com/repos/"$1"/releases/latest | grep '"tag_name":' | cut -d'"' -f4 } PORTAINER_LATEST_VERSION=$(get_latest_release "portainer/portainer") DOCKER_COMPOSE_LATEST_VERSION=$(get_latest_release "docker/compose") PORTAINER_AGENT_LATEST_VERSION=$(get_latest_release "portainer/agent") -read -r -p "Would you like to add Portainer? " prompt +read -r -p "${TAB3}Would you like to add Portainer? " prompt if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then msg_info "Installing Portainer $PORTAINER_LATEST_VERSION" docker volume create portainer_data >/dev/null @@ -49,7 +49,7 @@ if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then portainer/portainer-ce:latest msg_ok "Installed Portainer $PORTAINER_LATEST_VERSION" else - read -r -p "Would you like to add the Portainer Agent? " 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 docker run -d \ @@ -62,13 +62,13 @@ else msg_ok "Installed Portainer Agent $PORTAINER_AGENT_LATEST_VERSION" fi fi -read -r -p "Would you like to add Docker Compose? " prompt +read -r -p "${TAB3}Would you like to add Docker Compose? " prompt if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then msg_info "Installing Docker Compose $DOCKER_COMPOSE_LATEST_VERSION" DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker} - mkdir -p $DOCKER_CONFIG/cli-plugins - curl -fsSL https://github.com/docker/compose/releases/download/$DOCKER_COMPOSE_LATEST_VERSION/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose - chmod +x $DOCKER_CONFIG/cli-plugins/docker-compose + mkdir -p "$DOCKER_CONFIG"/cli-plugins + curl -fsSL https://github.com/docker/compose/releases/download/"$DOCKER_COMPOSE_LATEST_VERSION"/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose + chmod +x "$DOCKER_CONFIG"/cli-plugins/docker-compose msg_ok "Installed Docker Compose $DOCKER_COMPOSE_LATEST_VERSION" fi diff --git a/install/alpine-komodo-install.sh b/install/alpine-komodo-install.sh index b9681f3de..e87bf6876 100644 --- a/install/alpine-komodo-install.sh +++ b/install/alpine-komodo-install.sh @@ -26,11 +26,11 @@ $STD rc-update add docker boot $STD service docker start msg_ok "Enabled Docker Service" -echo "Choose the database for Komodo installation:" -echo "1) MongoDB (recommended)" -echo "2) SQLite" -echo "3) PostgreSQL" -read -rp "Enter your choice (default: 1): " DB_CHOICE +echo "${TAB3}Choose the database for Komodo installation:" +echo "${TAB3}1) MongoDB (recommended)" +echo "${TAB3}2) SQLite" +echo "${TAB3}3) PostgreSQL" +read -rp "${TAB3}Enter your choice (default: 1): " DB_CHOICE DB_CHOICE=${DB_CHOICE:-1} case $DB_CHOICE in diff --git a/install/alpine-mariadb-install.sh b/install/alpine-mariadb-install.sh index 572046575..89b76318e 100644 --- a/install/alpine-mariadb-install.sh +++ b/install/alpine-mariadb-install.sh @@ -29,7 +29,7 @@ mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql >/dev/null $STD rc-service mariadb start msg_ok "MariaDB Configured" -read -r -p "Would you like to install Adminer with lighttpd? : " 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/alpine-postgresql-install.sh b/install/alpine-postgresql-install.sh index b8cf02103..43532f9f9 100644 --- a/install/alpine-postgresql-install.sh +++ b/install/alpine-postgresql-install.sh @@ -33,7 +33,7 @@ sed -i '/^host\s\+all\s\+all\s\+127.0.0.1\/32\s\+md5/ s/.*/host all all 0.0.0.0\ $STD rc-service postgresql restart msg_ok "Configured and Restarted PostgreSQL" -read -r -p "Would you like to install Adminer with lighttpd? : " 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/alpine-traefik-install.sh b/install/alpine-traefik-install.sh index cdd2f5b4a..aa3abb871 100644 --- a/install/alpine-traefik-install.sh +++ b/install/alpine-traefik-install.sh @@ -21,7 +21,7 @@ msg_info "Installing Traefik" $STD apk add traefik --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community msg_ok "Installed Traefik" -read -p "Enable Traefik WebUI (Port 8080)? [y/N]: " enable_webui +read -p "${TAB3}Enable Traefik WebUI (Port 8080)? [y/N]: " enable_webui if [[ "$enable_webui" =~ ^[Yy]$ ]]; then msg_info "Configuring Traefik WebUI" mkdir -p /etc/traefik/config diff --git a/install/alpine-wireguard-install.sh b/install/alpine-wireguard-install.sh index fb770d542..276d308f2 100644 --- a/install/alpine-wireguard-install.sh +++ b/install/alpine-wireguard-install.sh @@ -46,7 +46,7 @@ $STD rc-update add sysctl $STD sysctl -p /etc/sysctl.conf msg_ok "Installed WireGuard" -read -rp "Do you want to install WGDashboard? (y/N): " INSTALL_WGD +read -rp "${TAB3}Do you want to install WGDashboard? (y/N): " INSTALL_WGD if [[ "$INSTALL_WGD" =~ ^[Yy]$ ]]; then msg_info "Installing additional dependencies for WGDashboard" $STD apk add --no-cache \ diff --git a/install/apache-tomcat-install.sh b/install/apache-tomcat-install.sh index 579531878..f76e5dd39 100644 --- a/install/apache-tomcat-install.sh +++ b/install/apache-tomcat-install.sh @@ -15,10 +15,10 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ - gnupg2 \ - lsb-release \ - gpg \ - apt-transport-https + gnupg2 \ + lsb-release \ + gpg \ + apt-transport-https msg_ok "Installed Dependencies" msg_info "Setting up Adoptium Repository" @@ -28,90 +28,90 @@ echo "deb https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_COD $STD apt-get update msg_ok "Set up Adoptium Repository" -read -r -p "Which Tomcat version would you like to install? (9, 10.1, 11): " 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): " - read -r jdk_version - case $jdk_version in - 8) - msg_info "Installing Temurin JDK 8 (LTS) for Tomcat $TOMCAT_VERSION" - $STD apt-get install -y temurin-8-jdk - msg_ok "Setup Temurin JDK 8 (LTS)" - ;; - 11) - msg_info "Installing Temurin JDK 11 (LTS) for Tomcat $TOMCAT_VERSION" - $STD apt-get install -y temurin-11-jdk - msg_ok "Setup Temurin JDK 11 (LTS)" - ;; - 17) - msg_info "Installing Temurin JDK 17 (LTS) for Tomcat $TOMCAT_VERSION" - $STD apt-get install -qqy temurin-17-jdk - msg_ok "Setup Temurin JDK 17 (LTS)" - ;; - 21) - msg_info "Installing Temurin JDK 21 (LTS) for Tomcat $TOMCAT_VERSION" - $STD apt-get install -y temurin-21-jdk - msg_ok "Setup Temurin JDK 21 (LTS)" - ;; - *) - msg_error "Invalid JDK version selected. Please enter 8, 11, 17 or 21." - exit 1 - ;; - esac + TOMCAT_VERSION="9" + echo "Which LTS Java version would you like to use? (8, 11, 17, 21): " + read -r jdk_version + case $jdk_version in + 8) + msg_info "Installing Temurin JDK 8 (LTS) for Tomcat $TOMCAT_VERSION" + $STD apt-get install -y temurin-8-jdk + msg_ok "Setup Temurin JDK 8 (LTS)" ;; -10 | 10.1) - TOMCAT_VERSION="10" - echo "Which LTS Java version would you like to use? (11, 17): " - read -r jdk_version - case $jdk_version in - 11) - msg_info "Installing Temurin JDK 11 (LTS) for Tomcat $TOMCAT_VERSION" - $STD apt-get install -y temurin-11-jdk - msg_ok "Setup Temurin JDK 11" - ;; - 17) - msg_info "Installing Temurin JDK 17 (LTS) for Tomcat $TOMCAT_VERSION" - $STD apt-get install -y temurin-17-jdk - msg_ok "Setup Temurin JDK 17" - ;; - 21) - msg_info "Installing Temurin JDK 21 (LTS) for Tomcat $TOMCAT_VERSION" - $STD apt-get install -y temurin-21-jdk - msg_ok "Setup Temurin JDK 21 (LTS)" - ;; - *) - msg_error "Invalid JDK version selected. Please enter 11 or 17." - exit 1 - ;; - esac + 11) + msg_info "Installing Temurin JDK 11 (LTS) for Tomcat $TOMCAT_VERSION" + $STD apt-get install -y temurin-11-jdk + msg_ok "Setup Temurin JDK 11 (LTS)" ;; -11) - TOMCAT_VERSION="11" - echo "Which LTS Java version would you like to use? (17, 21): " - read -r jdk_version - case $jdk_version in - 17) - msg_info "Installing Temurin JDK 17 (LTS) for Tomcat $TOMCAT_VERSION" - $STD apt-get install -qqy temurin-17-jdk - msg_ok "Setup Temurin JDK 17" - ;; - 21) - msg_info "Installing Temurin JDK 21 (LTS) for Tomcat $TOMCAT_VERSION" - $STD apt-get install -y temurin-21-jdk - msg_ok "Setup Temurin JDK 21 (LTS)" - ;; - *) - msg_error "Invalid JDK version selected. Please enter 17 or 21." - exit 1 - ;; - esac + 17) + msg_info "Installing Temurin JDK 17 (LTS) for Tomcat $TOMCAT_VERSION" + $STD apt-get install -qqy temurin-17-jdk + msg_ok "Setup Temurin JDK 17 (LTS)" ;; -*) - msg_error "Invalid Tomcat version selected. Please enter 9, 10.1 or 11." + 21) + msg_info "Installing Temurin JDK 21 (LTS) for Tomcat $TOMCAT_VERSION" + $STD apt-get install -y temurin-21-jdk + msg_ok "Setup Temurin JDK 21 (LTS)" + ;; + *) + msg_error "Invalid JDK version selected. Please enter 8, 11, 17 or 21." exit 1 ;; + esac + ;; +10 | 10.1) + TOMCAT_VERSION="10" + echo "Which LTS Java version would you like to use? (11, 17): " + read -r jdk_version + case $jdk_version in + 11) + msg_info "Installing Temurin JDK 11 (LTS) for Tomcat $TOMCAT_VERSION" + $STD apt-get install -y temurin-11-jdk + msg_ok "Setup Temurin JDK 11" + ;; + 17) + msg_info "Installing Temurin JDK 17 (LTS) for Tomcat $TOMCAT_VERSION" + $STD apt-get install -y temurin-17-jdk + msg_ok "Setup Temurin JDK 17" + ;; + 21) + msg_info "Installing Temurin JDK 21 (LTS) for Tomcat $TOMCAT_VERSION" + $STD apt-get install -y temurin-21-jdk + msg_ok "Setup Temurin JDK 21 (LTS)" + ;; + *) + msg_error "Invalid JDK version selected. Please enter 11 or 17." + exit 1 + ;; + esac + ;; +11) + TOMCAT_VERSION="11" + echo "Which LTS Java version would you like to use? (17, 21): " + read -r jdk_version + case $jdk_version in + 17) + msg_info "Installing Temurin JDK 17 (LTS) for Tomcat $TOMCAT_VERSION" + $STD apt-get install -qqy temurin-17-jdk + msg_ok "Setup Temurin JDK 17" + ;; + 21) + msg_info "Installing Temurin JDK 21 (LTS) for Tomcat $TOMCAT_VERSION" + $STD apt-get install -y temurin-21-jdk + msg_ok "Setup Temurin JDK 21 (LTS)" + ;; + *) + msg_error "Invalid JDK version selected. Please enter 17 or 21." + exit 1 + ;; + esac + ;; +*) + msg_error "Invalid Tomcat version selected. Please enter 9, 10.1 or 11." + exit 1 + ;; esac msg_info "Installing Tomcat $TOMCAT_VERSION" diff --git a/install/aria2-install.sh b/install/aria2-install.sh index 644d9660f..4e6398418 100644 --- a/install/aria2-install.sh +++ b/install/aria2-install.sh @@ -17,7 +17,7 @@ msg_info "Installing Aria2" $STD apt-get install -y aria2 msg_ok "Installed Aria2" -read -r -p "Would you like to add AriaNG? " prompt +read -r -p "${TAB3}Would you like to add AriaNG? " prompt if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then msg_info "Installing AriaNG" $STD apt-get install -y nginx diff --git a/install/authelia-install.sh b/install/authelia-install.sh index 0b9e32a67..16f4e0ada 100644 --- a/install/authelia-install.sh +++ b/install/authelia-install.sh @@ -19,7 +19,7 @@ curl -fsSL "https://github.com/authelia/authelia/releases/download/${RELEASE}/au $STD dpkg -i "authelia_${RELEASE}_amd64.deb" msg_ok "Install Authelia completed" -read -p "Enter your domain (ex. example.com): " DOMAIN +read -p "${TAB3}Enter your domain (ex. example.com): " DOMAIN msg_info "Setting Authelia up" touch /etc/authelia/emails.txt diff --git a/install/bytestash-install.sh b/install/bytestash-install.sh index 6338d6fd4..e668982ca 100644 --- a/install/bytestash-install.sh +++ b/install/bytestash-install.sh @@ -15,7 +15,7 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ - gnupg + gnupg msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" @@ -43,7 +43,7 @@ $STD npm install echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt" msg_ok "Installed ByteStash" -read -p "Do you want to allow registration of multiple accounts? [y/n]: " allowreg +read -p "${TAB3}Do you want to allow registration of multiple accounts? [y/n]: " allowreg msg_info "Creating Service" cat </etc/systemd/system/bytestash-backend.service @@ -62,7 +62,7 @@ WantedBy=multi-user.target EOF if [[ "$allowreg" =~ ^[Yy]$ ]]; then - sed -i '8i\Environment=ALLOW_NEW_ACCOUNTS=true' /etc/systemd/system/bytestash-backend.service + sed -i '8i\Environment=ALLOW_NEW_ACCOUNTS=true' /etc/systemd/system/bytestash-backend.service fi cat </etc/systemd/system/bytestash-frontend.service diff --git a/install/caddy-install.sh b/install/caddy-install.sh index 1447a0a96..1a035dc6f 100644 --- a/install/caddy-install.sh +++ b/install/caddy-install.sh @@ -28,7 +28,7 @@ $STD apt-get update $STD apt-get install -y caddy msg_ok "Installed Caddy" -read -r -p "Would you like to install xCaddy Addon? " prompt +read -r -p "${TAB3}Would you like to install xCaddy Addon? " prompt if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then msg_info "Installing Golang" set +o pipefail @@ -46,7 +46,7 @@ if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then cd /opt RELEASE=$(curl -fsSL https://api.github.com/repos/caddyserver/xcaddy/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') curl -fsSL "https://github.com/caddyserver/xcaddy/releases/download/${RELEASE}/xcaddy_${RELEASE:1}_linux_amd64.deb" -o $(basename "https://github.com/caddyserver/xcaddy/releases/download/${RELEASE}/xcaddy_${RELEASE:1}_linux_amd64.deb") - $STD dpkg -i xcaddy_${RELEASE:1}_linux_amd64.deb + $STD dpkg -i xcaddy_"${RELEASE:1}"_linux_amd64.deb rm -rf /opt/xcaddy* $STD xcaddy build msg_ok "Setup xCaddy" diff --git a/install/cloudflared-install.sh b/install/cloudflared-install.sh index a02c89566..b86d319da 100644 --- a/install/cloudflared-install.sh +++ b/install/cloudflared-install.sh @@ -22,7 +22,7 @@ $STD apt-get update $STD apt-get install -y cloudflared msg_ok "Installed Cloudflared" -read -r -p "Would you like to configure cloudflared as a DNS-over-HTTPS (DoH) proxy? " prompt +read -r -p "${TAB3}Would you like to configure cloudflared as a DNS-over-HTTPS (DoH) proxy? " prompt if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then msg_info "Creating Service" cat </usr/local/etc/cloudflared/config.yml diff --git a/install/cryptpad-install.sh b/install/cryptpad-install.sh index e19dee82d..81bd24c4c 100644 --- a/install/cryptpad-install.sh +++ b/install/cryptpad-install.sh @@ -15,8 +15,8 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ - gnupg \ - git + gnupg \ + git msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" @@ -30,7 +30,7 @@ $STD apt-get update $STD apt-get install -y nodejs msg_ok "Setup Node.js" -read -p "Install OnlyOffice components instead of CKEditor? (Y/N): " onlyoffice +read -p "${TAB3}Install OnlyOffice components instead of CKEditor? (Y/N): " onlyoffice msg_info "Setup ${APPLICATION}" temp_file=$(mktemp) @@ -47,7 +47,7 @@ IP=$(hostname -I | awk '{print $1}') sed -i "51s/localhost/${IP}/g" /opt/cryptpad/config/config.js sed -i "80s#//httpAddress: 'localhost'#httpAddress: '0.0.0.0'#g" /opt/cryptpad/config/config.js if [[ "$onlyoffice" =~ ^[Yy]$ ]]; then - $STD bash -c "./install-onlyoffice.sh --accept-license" + $STD bash -c "./install-onlyoffice.sh --accept-license" fi echo "${RELEASE}" >/opt/${APPLICATION}_version.txt msg_ok "Setup ${APPLICATION}" diff --git a/install/docker-install.sh b/install/docker-install.sh index 293bde0c6..6997225ca 100644 --- a/install/docker-install.sh +++ b/install/docker-install.sh @@ -14,7 +14,7 @@ network_check update_os get_latest_release() { - curl -fsSL https://api.github.com/repos/$1/releases/latest | grep '"tag_name":' | cut -d'"' -f4 + curl -fsSL https://api.github.com/repos/"$1"/releases/latest | grep '"tag_name":' | cut -d'"' -f4 } DOCKER_LATEST_VERSION=$(get_latest_release "moby/moby") @@ -29,7 +29,7 @@ echo -e '{\n "log-driver": "journald"\n}' >/etc/docker/daemon.json $STD sh <(curl -fsSL https://get.docker.com) msg_ok "Installed Docker $DOCKER_LATEST_VERSION" -read -r -p "Would you like to add Portainer? " prompt +read -r -p "${TAB3}Would you like to add Portainer? " prompt if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then msg_info "Installing Portainer $PORTAINER_LATEST_VERSION" docker volume create portainer_data >/dev/null @@ -43,7 +43,7 @@ if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then portainer/portainer-ce:latest msg_ok "Installed Portainer $PORTAINER_LATEST_VERSION" else - read -r -p "Would you like to add the Portainer Agent? " 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 docker run -d \ diff --git a/install/dockge-install.sh b/install/dockge-install.sh index c8ca6fd00..261f71603 100644 --- a/install/dockge-install.sh +++ b/install/dockge-install.sh @@ -41,7 +41,7 @@ cd /opt/dockge $STD docker compose up -d msg_ok "Installed Dockge" -read -r -p "Would you like to add Immich? " prompt +read -r -p "${TAB3}Would you like to add Immich? " prompt if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then msg_info "Adding Immich compose.yaml" mkdir -p /opt/stacks/immich @@ -50,7 +50,7 @@ if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then msg_ok "Added Immich compose.yaml" fi -read -r -p "Would you like to add Home Assistant? " prompt +read -r -p "${TAB3}Would you like to add Home Assistant? " prompt if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then msg_info "Adding Home Assistant compose.yaml" mkdir -p /opt/stacks/homeassistant diff --git a/install/dotnetaspwebapi-install.sh b/install/dotnetaspwebapi-install.sh index f06db6e11..191395b03 100644 --- a/install/dotnetaspwebapi-install.sh +++ b/install/dotnetaspwebapi-install.sh @@ -28,7 +28,7 @@ msg_ok "Installed Dependencies" msg_info "Configure Application" var_project_name="default" -read -r -p "Type the assembly name of the project: " var_project_name +read -r -p "${TAB3}Type the assembly name of the project: " var_project_name echo "Target assembly: '${var_project_name}'" msg_ok "Application Configured" diff --git a/install/elementsynapse-install.sh b/install/elementsynapse-install.sh index 6e33445c0..285419c20 100644 --- a/install/elementsynapse-install.sh +++ b/install/elementsynapse-install.sh @@ -33,7 +33,7 @@ $STD apt-get install -y nodejs $STD npm install -g yarn msg_ok "Installed Node.js" -read -p "Please enter the name for your server: " servername +read -p "${TAB3}Please enter the name for your server: " servername msg_info "Installing Element Synapse" curl -fsSL "https://packages.matrix.org/debian/matrix-org-archive-keyring.gpg" -o "/usr/share/keyrings/matrix-org-archive-keyring.gpg" diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh index 5ccb3db47..77a3244f5 100644 --- a/install/fileflows-install.sh +++ b/install/fileflows-install.sh @@ -21,7 +21,7 @@ $STD apt-get install -y \ imagemagick msg_ok "Installed Dependencies" -read -r -p "Do you need the intel-media-va-driver-non-free driver for HW encoding (Debian 12 only)? " prompt +read -r -p "${TAB3}Do you need the intel-media-va-driver-non-free driver for HW encoding (Debian 12 only)? " prompt if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then msg_info "Installing Intel Hardware Acceleration (non-free)" cat </etc/apt/sources.list.d/non-free.list diff --git a/install/influxdb-install.sh b/install/influxdb-install.sh index ee02eb8d8..82e35ed88 100644 --- a/install/influxdb-install.sh +++ b/install/influxdb-install.sh @@ -24,7 +24,7 @@ curl -fsSL "https://repos.influxdata.com/influxdata-archive_compat.key" | gpg -- echo "deb [signed-by=/etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg] https://repos.influxdata.com/debian stable main" >/etc/apt/sources.list.d/influxdata.list msg_ok "Set up InfluxDB Repository" -read -r -p "Which version of InfluxDB to install? (1 or 2) " prompt +read -r -p "${TAB3}Which version of InfluxDB to install? (1 or 2) " prompt if [[ $prompt == "2" ]]; then INFLUX="2" else @@ -43,7 +43,7 @@ fi $STD systemctl enable --now influxdb msg_ok "Installed InfluxDB" -read -r -p "Would you like to add Telegraf? " prompt +read -r -p "${TAB3}Would you like to add Telegraf? " prompt if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then msg_info "Installing Telegraf" $STD apt-get install -y telegraf diff --git a/install/kometa-install.sh b/install/kometa-install.sh index 5a3378792..8c9634188 100644 --- a/install/kometa-install.sh +++ b/install/kometa-install.sh @@ -21,9 +21,9 @@ msg_ok "Setup Python 3" msg_info "Setup Kometa" temp_file=$(mktemp) RELEASE=$(curl -fsSL https://api.github.com/repos/Kometa-Team/Kometa/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -curl -fsSL "https://github.com/Kometa-Team/Kometa/archive/refs/tags/v${RELEASE}.tar.gz" -o ""$temp_file"" +curl -fsSL "https://github.com/Kometa-Team/Kometa/archive/refs/tags/v${RELEASE}.tar.gz" -o """$temp_file""" tar -xzf "$temp_file" -mv Kometa-${RELEASE} /opt/kometa +mv Kometa-"${RELEASE}" /opt/kometa cd /opt/kometa $STD pip install -r requirements.txt --ignore-installed mkdir -p config/assets @@ -31,10 +31,10 @@ cp config/config.yml.template config/config.yml echo "${RELEASE}" >/opt/kometa_version.txt msg_ok "Setup Kometa" -read -p "Enter your TMDb API key: " TMDBKEY -read -p "Enter your Plex URL: " PLEXURL -read -p "Enter your Plex token: " PLEXTOKEN -sed -i -e "s#url: http://192.168.1.12:32400#url: $PLEXURL#g" /opt/kometa/config/config.yml +read -p "${TAB3}nter your TMDb API key: " TMDBKEY +read -p "${TAB3}Enter your Plex URL: " PLEXURL +read -p "${TAB3}Enter your Plex token: " PLEXTOKEN +sed -i -e "s#url: http://192.168.1.12:32400#url: $PLEXURL #g" /opt/kometa/config/config.yml sed -i -e "s/token: ####################/token: $PLEXTOKEN/g" /opt/kometa/config/config.yml sed -i -e "s/apikey: ################################/apikey: $TMDBKEY/g" /opt/kometa/config/config.yml @@ -61,7 +61,7 @@ motd_ssh customize msg_info "Cleaning up" -rm -f $temp_file +rm -f "$temp_file" $STD apt-get -y autoremove $STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/komodo-install.sh b/install/komodo-install.sh index 8ce70224c..f6fef282a 100644 --- a/install/komodo-install.sh +++ b/install/komodo-install.sh @@ -37,11 +37,11 @@ $STD apt-get install -y \ docker-compose-plugin msg_ok "Installed Docker" -echo "Choose the database for Komodo installation:" -echo "1) MongoDB (recommended)" -echo "2) SQLite" -echo "3) PostgreSQL" -read -rp "Enter your choice (default: 1): " DB_CHOICE +echo "${TAB3}Choose the database for Komodo installation:" +echo "${TAB3}1) MongoDB (recommended)" +echo "${TAB3}2) SQLite" +echo "${TAB3}3) PostgreSQL" +read -rp "${TAB3}Enter your choice (default: 1): " DB_CHOICE DB_CHOICE=${DB_CHOICE:-1} case $DB_CHOICE in diff --git a/install/linkwarden-install.sh b/install/linkwarden-install.sh index e54550f1a..4a2501428 100644 --- a/install/linkwarden-install.sh +++ b/install/linkwarden-install.sh @@ -31,7 +31,7 @@ install_postgresql msg_info "Installing Rust" curl -fsSL https://sh.rustup.rs -o rustup-init.sh $STD bash rustup-init.sh -y --profile minimal -echo 'export PATH="$HOME/.cargo/bin:$PATH"' >> ~/.bashrc +echo 'export PATH="$HOME/.cargo/bin:$PATH"' >>~/.bashrc export PATH="$HOME/.cargo/bin:$PATH" rm rustup-init.sh $STD cargo install monolith @@ -56,7 +56,7 @@ $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC';" } >>~/linkwarden.creds msg_ok "Set up PostgreSQL DB" -read -r -p "Would you like to add Adminer? " 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 diff --git a/install/mariadb-install.sh b/install/mariadb-install.sh index 6eba9d310..3aa1444a1 100644 --- a/install/mariadb-install.sh +++ b/install/mariadb-install.sh @@ -19,7 +19,7 @@ sed -i 's/^# *\(port *=.*\)/\1/' /etc/mysql/my.cnf sed -i 's/^bind-address/#bind-address/g' /etc/mysql/mariadb.conf.d/50-server.cnf msg_ok "Installed MariaDB" -read -r -p "Would you like to add PhpMyAdmin? " prompt +read -r -p "${TAB3}Would you like to add PhpMyAdmin? " prompt if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then msg_info "Installing phpMyAdmin" $STD apt-get install -y \ diff --git a/install/meilisearch-install.sh b/install/meilisearch-install.sh index 297bdca40..a25a20360 100644 --- a/install/meilisearch-install.sh +++ b/install/meilisearch-install.sh @@ -15,7 +15,7 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ - gnupg + gnupg msg_ok "Installed Dependencies" msg_info "Setup ${APPLICATION}" @@ -27,49 +27,49 @@ curl -fsSL https://raw.githubusercontent.com/meilisearch/meilisearch/latest/conf MASTER_KEY=$(openssl rand -base64 12) LOCAL_IP="$(hostname -I | awk '{print $1}')" sed -i \ - -e 's|^env =.*|env = "production"|' \ - -e "s|^# master_key =.*|master_key = \"$MASTER_KEY\"|" \ - -e 's|^db_path =.*|db_path = "/var/lib/meilisearch/data"|' \ - -e 's|^dump_dir =.*|dump_dir = "/var/lib/meilisearch/dumps"|' \ - -e 's|^snapshot_dir =.*|snapshot_dir = "/var/lib/meilisearch/snapshots"|' \ - -e 's|^# no_analytics = true|no_analytics = true|' \ - -e 's|^http_addr =.*|http_addr = "0.0.0.0:7700"|' \ - /etc/meilisearch.toml + -e 's|^env =.*|env = "production"|' \ + -e "s|^# master_key =.*|master_key = \"$MASTER_KEY\"|" \ + -e 's|^db_path =.*|db_path = "/var/lib/meilisearch/data"|' \ + -e 's|^dump_dir =.*|dump_dir = "/var/lib/meilisearch/dumps"|' \ + -e 's|^snapshot_dir =.*|snapshot_dir = "/var/lib/meilisearch/snapshots"|' \ + -e 's|^# no_analytics = true|no_analytics = true|' \ + -e 's|^http_addr =.*|http_addr = "0.0.0.0:7700"|' \ + /etc/meilisearch.toml echo "${RELEASE}" >/opt/${APPLICATION}_version.txt msg_ok "Setup ${APPLICATION}" -read -r -p "Do you want add meilisearch-ui? [y/n]: " prompt +read -r -p "${TAB3}Do you want add meilisearch-ui? [y/n]: " prompt if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then - msg_info "Setting up Node.js Repository" - mkdir -p /etc/apt/keyrings - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg - echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list - msg_ok "Set up Node.js Repository" + msg_info "Setting up Node.js Repository" + mkdir -p /etc/apt/keyrings + curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg + echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list + msg_ok "Set up Node.js Repository" - msg_info "Installing Node.js" - $STD apt-get update - $STD apt-get install -y nodejs - $STD npm install -g pnpm - msg_ok "Installed Node.js" + msg_info "Installing Node.js" + $STD apt-get update + $STD apt-get install -y nodejs + $STD npm install -g pnpm + msg_ok "Installed Node.js" - msg_info "Setup ${APPLICATION}-ui" - tmp_file=$(mktemp) - tmp_dir=$(mktemp -d) - mkdir -p /opt/meilisearch-ui - RELEASE_UI=$(curl -s https://api.github.com/repos/riccox/meilisearch-ui/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') - curl -fsSL "https://github.com/riccox/meilisearch-ui/archive/refs/tags/${RELEASE_UI}.zip" -o $tmp_file - unzip -q "$tmp_file" -d "$tmp_dir" - mv "$tmp_dir"/*/* /opt/meilisearch-ui/ - cd /opt/meilisearch-ui - sed -i 's|const hash = execSync("git rev-parse HEAD").toString().trim();|const hash = "unknown";|' /opt/meilisearch-ui/vite.config.ts - $STD pnpm install - cat < /opt/meilisearch-ui/.env.local + msg_info "Setup ${APPLICATION}-ui" + tmp_file=$(mktemp) + tmp_dir=$(mktemp -d) + mkdir -p /opt/meilisearch-ui + RELEASE_UI=$(curl -s https://api.github.com/repos/riccox/meilisearch-ui/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') + curl -fsSL "https://github.com/riccox/meilisearch-ui/archive/refs/tags/${RELEASE_UI}.zip" -o "$tmp_file" + unzip -q "$tmp_file" -d "$tmp_dir" + mv "$tmp_dir"/*/* /opt/meilisearch-ui/ + cd /opt/meilisearch-ui + sed -i 's|const hash = execSync("git rev-parse HEAD").toString().trim();|const hash = "unknown";|' /opt/meilisearch-ui/vite.config.ts + $STD pnpm install + cat </opt/meilisearch-ui/.env.local VITE_SINGLETON_MODE=true VITE_SINGLETON_HOST=http://${LOCAL_IP}:7700 VITE_SINGLETON_API_KEY=${MASTER_KEY} EOF - echo "${RELEASE_UI}" >/opt/${APPLICATION}-ui_version.txt - msg_ok "Setup ${APPLICATION}-ui" + echo "${RELEASE_UI}" >/opt/${APPLICATION}-ui_version.txt + msg_ok "Setup ${APPLICATION}-ui" fi msg_info "Setting up Services" @@ -88,7 +88,7 @@ EOF systemctl enable -q --now meilisearch if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then -cat < /etc/systemd/system/meilisearch-ui.service + cat </etc/systemd/system/meilisearch-ui.service [Unit] Description=Meilisearch UI Service After=network.target meilisearch.service @@ -107,12 +107,11 @@ SyslogIdentifier=meilisearch-ui [Install] WantedBy=multi-user.target EOF -systemctl enable -q --now meilisearch-ui + systemctl enable -q --now meilisearch-ui fi msg_ok "Set up Services" - motd_ssh customize diff --git a/install/mongodb-install.sh b/install/mongodb-install.sh index 5e1abad17..13c2c4831 100644 --- a/install/mongodb-install.sh +++ b/install/mongodb-install.sh @@ -17,7 +17,7 @@ msg_info "Installing Dependencies" $STD apt-get install -y gnupg msg_ok "Installed Dependencies" -read -p "Do you want to install MongoDB 8.0 instead of 7.0? [y/N]: " install_mongodb_8 +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 MONGODB_VERSION="8.0" else diff --git a/install/mysql-install.sh b/install/mysql-install.sh index 4df9822f2..2d4fc5e2e 100644 --- a/install/mysql-install.sh +++ b/install/mysql-install.sh @@ -22,7 +22,7 @@ msg_ok "Installed Dependencies" RELEASE_REPO="mysql-8.0" RELEASE_AUTH="mysql_native_password" -read -r -p "Would you like to install the MySQL 8.4 LTS release instead of MySQL 8.0 (bug fix track; EOL April-2026)? " 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 if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then RELEASE_REPO="mysql-8.4-lts" RELEASE_AUTH="caching_sha2_password" @@ -50,7 +50,7 @@ echo -e "MySQL user: root" >>~/mysql.creds echo -e "MySQL password: $ADMIN_PASS" >>~/mysql.creds msg_ok "MySQL Server configured" -read -r -p "Would you like to add PhpMyAdmin? " prompt +read -r -p "${TAB3}Would you like to add PhpMyAdmin? " prompt if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then msg_info "Installing phpMyAdmin" $STD apt-get install -y \ diff --git a/install/navidrome-install.sh b/install/navidrome-install.sh index 6e5200a86..0d1fdc167 100644 --- a/install/navidrome-install.sh +++ b/install/navidrome-install.sh @@ -15,7 +15,7 @@ update_os msg_info "Installing Dependencies (Patience)" $STD apt-get install -y \ - ffmpeg + ffmpeg msg_ok "Installed Dependencies" msg_info "Installing Navidrome" @@ -27,9 +27,9 @@ systemctl enable -q --now navidrome echo "${RELEASE}" >/opt/Navidrome_version.txt msg_ok "Installed Navidrome" -read -p "Do you want to install filebrowser addon? (y/n) " -n 1 -r +read -p "${TAB3}Do you want to install filebrowser addon? (y/n) " -n 1 -r if [[ $REPLY =~ ^[Yy]$ ]]; then - bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/addon/filebrowser.sh)" + bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/addon/filebrowser.sh)" fi motd_ssh diff --git a/install/nginxproxymanager-install.sh b/install/nginxproxymanager-install.sh index 02f02945e..124d16304 100644 --- a/install/nginxproxymanager-install.sh +++ b/install/nginxproxymanager-install.sh @@ -62,7 +62,7 @@ RELEASE=$(curl -fsSL https://api.github.com/repos/NginxProxyManager/nginx-proxy- grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -read -r -p "Would you like to install an older version (v2.10.4)? " prompt +read -r -p "${TAB3}Would you like to install an older version (v2.10.4)? " prompt if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then msg_info "Downloading Nginx Proxy Manager v2.10.4" curl -fsSL "https://codeload.github.com/NginxProxyManager/nginx-proxy-manager/tar.gz/v2.10.4" | tar -xz @@ -71,7 +71,7 @@ if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then else msg_info "Downloading Nginx Proxy Manager v${RELEASE}" curl -fsSL "https://codeload.github.com/NginxProxyManager/nginx-proxy-manager/tar.gz/v${RELEASE}" | tar -xz - cd ./nginx-proxy-manager-${RELEASE} + cd ./nginx-proxy-manager-"${RELEASE}" msg_ok "Downloaded Nginx Proxy Manager v${RELEASE}" fi msg_info "Setting up Environment" diff --git a/install/npmplus-install.sh b/install/npmplus-install.sh index d283895c6..f69ed3959 100644 --- a/install/npmplus-install.sh +++ b/install/npmplus-install.sh @@ -15,9 +15,9 @@ update_os msg_info "Installing Dependencies" $STD apk add \ - tzdata \ - gawk \ - yq + tzdata \ + gawk \ + yq msg_ok "Installed Dependencies" msg_info "Installing Docker & Compose" @@ -26,7 +26,7 @@ $STD rc-service docker start $STD rc-update add docker default get_latest_release() { - curl -fsSL https://api.github.com/repos/$1/releases/latest | grep '"tag_name":' | cut -d'"' -f4 + curl -fsSL https://api.github.com/repos/$1/releases/latest | grep '"tag_name":' | cut -d'"' -f4 } DOCKER_COMPOSE_LATEST_VERSION=$(get_latest_release "docker/compose") DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker} @@ -42,20 +42,20 @@ msg_ok "Fetched NPMplus" attempts=0 while true; do - read -r -p "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." + 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." - attempts=$((attempts + 1)) - if [[ "$attempts" -ge 3 ]]; then - msg_error "Maximum attempts reached. Exiting." - exit 1 - fi + attempts=$((attempts + 1)) + if [[ "$attempts" -ge 3 ]]; then + msg_error "Maximum attempts reached. Exiting." + exit 1 + fi done -read -r -p "Enter your ACME Email: " ACME_EMAIL_INPUT +read -r -p "${TAB3}Enter your ACME Email: " ACME_EMAIL_INPUT yq -i " .services.npmplus.environment |= @@ -67,20 +67,20 @@ msg_info "Building and Starting NPMplus (Patience)" $STD docker compose up -d CONTAINER_ID="" for i in {1..60}; do - CONTAINER_ID=$(docker ps --filter "name=npmplus" --format "{{.ID}}") - if [[ -n "$CONTAINER_ID" ]]; then - STATUS=$(docker inspect --format '{{.State.Health.Status}}' "$CONTAINER_ID" 2>/dev/null || echo "starting") - if [[ "$STATUS" == "healthy" ]]; then - msg_ok "NPMplus is running and healthy" - break - elif [[ "$STATUS" == "unhealthy" ]]; then - msg_error "NPMplus container is unhealthy! Check logs." - docker logs "$CONTAINER_ID" - exit 1 - fi + CONTAINER_ID=$(docker ps --filter "name=npmplus" --format "{{.ID}}") + if [[ -n "$CONTAINER_ID" ]]; then + STATUS=$(docker inspect --format '{{.State.Health.Status}}' "$CONTAINER_ID" 2>/dev/null || echo "starting") + if [[ "$STATUS" == "healthy" ]]; then + msg_ok "NPMplus is running and healthy" + break + elif [[ "$STATUS" == "unhealthy" ]]; then + msg_error "NPMplus container is unhealthy! Check logs." + docker logs "$CONTAINER_ID" + exit 1 fi - sleep 2 - [[ $i -eq 60 ]] && msg_error "NPMplus container did not become healthy within 120s." && docker logs "$CONTAINER_ID" && exit 1 + fi + sleep 2 + [[ $i -eq 60 ]] && msg_error "NPMplus container did not become healthy within 120s." && docker logs "$CONTAINER_ID" && exit 1 done msg_ok "Builded and started NPMplus" @@ -90,18 +90,18 @@ customize msg_info "Retrieving Default Login (Patience)" PASSWORD_FOUND=0 for i in {1..60}; do - PASSWORD_LINE=$(docker logs "$CONTAINER_ID" 2>&1 | awk '/Creating a new user:/ { print; exit }') - if [[ -n "$PASSWORD_LINE" ]]; then - PASSWORD=$(echo "$PASSWORD_LINE" | awk -F 'password: ' '{print $2}') - echo -e "username: admin@example.org\npassword: $PASSWORD" >/opt/.npm_pwd - msg_ok "Saved default login to /opt/.npm_pwd" - PASSWORD_FOUND=1 - break - fi - sleep 2 + PASSWORD_LINE=$(docker logs "$CONTAINER_ID" 2>&1 | awk '/Creating a new user:/ { print; exit }') + if [[ -n "$PASSWORD_LINE" ]]; then + PASSWORD=$(echo "$PASSWORD_LINE" | awk -F 'password: ' '{print $2}') + echo -e "username: admin@example.org\npassword: $PASSWORD" >/opt/.npm_pwd + msg_ok "Saved default login to /opt/.npm_pwd" + PASSWORD_FOUND=1 + break + fi + sleep 2 done if [[ $PASSWORD_FOUND -eq 0 ]]; then - msg_error "Could not retrieve default login after 60 seconds." - echo -e "\nYou can manually check the container logs with:\n docker logs $CONTAINER_ID | grep 'Creating a new user:'\n" + msg_error "Could not retrieve default login after 60 seconds." + echo -e "\nYou can manually check the container logs with:\n docker logs $CONTAINER_ID | grep 'Creating a new user:'\n" fi diff --git a/install/openwebui-install.sh b/install/openwebui-install.sh index fa27ce8a9..7238fce39 100644 --- a/install/openwebui-install.sh +++ b/install/openwebui-install.sh @@ -55,7 +55,7 @@ export NODE_OPTIONS="--max-old-space-size=3584" $STD npm run build msg_ok "Installed Open WebUI" -read -r -p "Would you like to add Ollama? " prompt +read -r -p "${TAB3}Would you like to add Ollama? " prompt if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then msg_info "Installing Ollama" curl -fsSLO https://ollama.com/download/ollama-linux-amd64.tgz diff --git a/install/openziti-controller-install.sh b/install/openziti-controller-install.sh index bbeddec7d..78a2c0ad5 100644 --- a/install/openziti-controller-install.sh +++ b/install/openziti-controller-install.sh @@ -5,7 +5,7 @@ # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # Source: https://github.com/openziti/ziti -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors @@ -21,22 +21,22 @@ msg_info "Installing openziti" mkdir -p --mode=0755 /usr/share/keyrings curl -fsSL https://get.openziti.io/tun/package-repos.gpg | gpg --dearmor -o /usr/share/keyrings/openziti.gpg echo "deb [signed-by=/usr/share/keyrings/openziti.gpg] https://packages.openziti.org/zitipax-openziti-deb-stable debian main" >/etc/apt/sources.list.d/openziti.list -$STD apt-get update +$STD apt-get update $STD apt-get install -y openziti-controller openziti-console msg_ok "Installed openziti" -read -r -p "Would you like to go through the auto configuration now? " prompt +read -r -p "${TAB3}Would you like to go through the auto configuration now? " prompt if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then IPADDRESS=$(hostname -I | awk '{print $1}') GEN_FQDN="controller.${IPADDRESS}.sslip.io" - read -r -p "Please enter the controller FQDN [${GEN_FQDN}]: " ZITI_CTRL_ADVERTISED_ADDRESS + 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} - read -r -p "Please enter the controller port [1280]: " ZITI_CTRL_ADVERTISED_PORT + read -r -p "${TAB3}Please enter the controller port [1280]: " ZITI_CTRL_ADVERTISED_PORT ZITI_CTRL_ADVERTISED_PORT=${ZITI_CTRL_ADVERTISED_PORT:-1280} - read -r -p "Please enter the controller admin user [admin]: " ZITI_USER + 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) - read -r -p "Please enter the controller admin password [${GEN_PWD}]:" ZITI_PWD + 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" diff --git a/install/openziti-tunnel-install.sh b/install/openziti-tunnel-install.sh index 97d85e924..e781fa51e 100644 --- a/install/openziti-tunnel-install.sh +++ b/install/openziti-tunnel-install.sh @@ -27,16 +27,16 @@ sed -i '0,/^ExecStart/ { /^ExecStart/ { n; s|^ExecStart.*|ExecStart=/opt/openzit systemctl daemon-reload msg_ok "Installed openziti" -read -r -p "Please paste an identity enrollment token(JTW)" prompt +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 - chown ziti:ziti /opt/openziti/etc/identities/identity.jwt - systemctl enable -q --now ziti-edge-tunnel - msg_ok "Service Started" + msg_info "Adding identity" + echo "${prompt}" >/opt/openziti/etc/identities/identity.jwt + chown ziti:ziti /opt/openziti/etc/identities/identity.jwt + systemctl enable -q --now ziti-edge-tunnel + msg_ok "Service Started" else - systemctl enable -q ziti-edge-tunnel - msg_error "No identity provided; please place an identity file in /opt/openziti/etc/identities/ and restart the service" + systemctl enable -q ziti-edge-tunnel + msg_error "No identity provided; please place an identity file in /opt/openziti/etc/identities/ and restart the service" fi motd_ssh diff --git a/install/paperless-gpt-install.sh b/install/paperless-gpt-install.sh index f78a2da4e..7ccb1c456 100644 --- a/install/paperless-gpt-install.sh +++ b/install/paperless-gpt-install.sh @@ -50,8 +50,8 @@ msg_info "Setup Paperless-GPT" temp_file=$(mktemp) RELEASE=$(curl -fsSL https://api.github.com/repos/icereed/paperless-gpt/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') curl -fsSL "https://github.com/icereed/paperless-gpt/archive/refs/tags/v${RELEASE}.tar.gz" -o "$temp_file" -tar zxf $temp_file -mv paperless-gpt-${RELEASE} /opt/paperless-gpt +tar zxf "$temp_file" +mv paperless-gpt-"${RELEASE}" /opt/paperless-gpt cd /opt/paperless-gpt/web-app $STD npm install $STD npm run build @@ -64,16 +64,16 @@ echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt" msg_ok "Setup Paperless-GPT" mkdir -p /opt/paperless-gpt-data -read -p "Do you want to enter the Paperless local URL now? (y/n) " input_url +read -p "${TAB3}Do you want to enter the Paperless local URL now? (y/n) " input_url if [[ "$input_url" =~ ^[Yy]$ ]]; then - read -p "Enter your Paperless-NGX instance URL (e.g., http://192.168.1.100:8000): " PAPERLESS_BASE_URL + read -p "${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 -read -p "Do you want to enter the Paperless API token now? (y/n) " input_token +read -p "${TAB3}Do you want to enter the Paperless API token now? (y/n) " input_token if [[ "$input_token" =~ ^[Yy]$ ]]; then - read -p "Enter your Paperless API token: " PAPERLESS_API_TOKEN + read -p "${TAB3}Enter your Paperless API token: " PAPERLESS_API_TOKEN else PAPERLESS_API_TOKEN="your_paperless_api_token" fi @@ -129,7 +129,7 @@ motd_ssh customize msg_info "Cleaning up" -rm -f $temp_file +rm -f "$temp_file" $STD apt-get -y autoremove $STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/paperless-ngx-install.sh b/install/paperless-ngx-install.sh index 01daa7916..b1cd99331 100644 --- a/install/paperless-ngx-install.sh +++ b/install/paperless-ngx-install.sh @@ -125,7 +125,7 @@ cd /opt/paperless/src $STD python3 manage.py migrate msg_ok "Set up PostgreSQL database" -read -r -p "Would you like to add Adminer? " 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 diff --git a/install/pihole-install.sh b/install/pihole-install.sh index 3ea462d74..79c7cf262 100644 --- a/install/pihole-install.sh +++ b/install/pihole-install.sh @@ -54,9 +54,9 @@ $STD pihole-FTL --config ntp.sync.interval 0 systemctl restart pihole-FTL.service msg_ok "Installed Pi-hole" -read -r -p "Would you like to add Unbound? " prompt +read -r -p "${TAB3}Would you like to add Unbound? " prompt if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then - read -r -p "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 + 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" $STD apt-get install -y unbound cat </etc/unbound/unbound.conf.d/pi-hole.conf diff --git a/install/pocketid-install.sh b/install/pocketid-install.sh index 47e8f8f7e..9350303af 100644 --- a/install/pocketid-install.sh +++ b/install/pocketid-install.sh @@ -42,7 +42,7 @@ rm -f "$temp_file" set -o pipefail msg_ok "Installed Golang" -read -r -p "What public URL do you want to use (e.g. pocketid.mydomain.com)? " public_url +read -r -p "${TAB3}What public URL do you want to use (e.g. pocketid.mydomain.com)? " public_url msg_info "Setup Pocket ID" cd /opt RELEASE=$(curl -fsSL https://api.github.com/repos/pocket-id/pocket-id/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') @@ -125,4 +125,4 @@ $STD apt-get -y autoclean msg_ok "Cleaned" motd_ssh -customize \ No newline at end of file +customize diff --git a/install/podman-homeassistant-install.sh b/install/podman-homeassistant-install.sh index 82affeac6..5b6d1ea9d 100644 --- a/install/podman-homeassistant-install.sh +++ b/install/podman-homeassistant-install.sh @@ -49,7 +49,7 @@ $STD systemctl enable --now podman.socket echo -e 'unqualified-search-registries=["docker.io"]' >>/etc/containers/registries.conf msg_ok "Installed Podman" -read -r -p "Would you like to add Portainer? " 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 @@ -63,7 +63,7 @@ if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then portainer/portainer-ce:latest msg_ok "Installed Portainer $PORTAINER_LATEST_VERSION" else - read -r -p "Would you like to add the Portainer Agent? " 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" podman volume create temp >/dev/null diff --git a/install/podman-install.sh b/install/podman-install.sh index c91835fa4..5158f8daa 100644 --- a/install/podman-install.sh +++ b/install/podman-install.sh @@ -49,7 +49,7 @@ $STD systemctl enable --now podman.socket echo -e 'unqualified-search-registries=["docker.io"]' >>/etc/containers/registries.conf msg_ok "Installed Podman" -read -r -p "Would you like to add Portainer? " 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 @@ -63,7 +63,7 @@ if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then portainer/portainer-ce:latest msg_ok "Installed Portainer $PORTAINER_LATEST_VERSION" else - read -r -p "Would you like to add the Portainer Agent? " 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" podman volume create temp >/dev/null diff --git a/install/postgresql-install.sh b/install/postgresql-install.sh index bfcabf5ec..ce4503bd6 100644 --- a/install/postgresql-install.sh +++ b/install/postgresql-install.sh @@ -130,7 +130,7 @@ EOF sudo systemctl restart postgresql msg_ok "Installed PostgreSQL" -read -r -p "Would you like to add Adminer? " 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 diff --git a/install/pterodactyl-panel-install.sh b/install/pterodactyl-panel-install.sh index 30ae73078..4bab7899f 100644 --- a/install/pterodactyl-panel-install.sh +++ b/install/pterodactyl-panel-install.sh @@ -53,9 +53,9 @@ $STD mysql -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH } >>~/pterodactyl-panel.creds msg_ok "Set up MariaDB" -read -p "Provide an email address for admin login, this should be a valid email address: " ADMIN_EMAIL -read -p "Enter your First Name: " NAME_FIRST -read -p "Enter your Last Name: " NAME_LAST +read -p "${TAB3}Provide an email address for admin login, this should be a valid email address: " ADMIN_EMAIL +read -p "${TAB3}nter your First Name: " NAME_FIRST +read -p "${TAB3}Enter your Last Name: " NAME_LAST msg_info "Installing pterodactyl Panel" RELEASE=$(curl -fsSL https://api.github.com/repos/pterodactyl/panel/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') diff --git a/install/sqlserver2022-install.sh b/install/sqlserver2022-install.sh index ef7b39582..8cb13a1fe 100644 --- a/install/sqlserver2022-install.sh +++ b/install/sqlserver2022-install.sh @@ -39,7 +39,7 @@ echo 'export PATH="$PATH:/opt/mssql-tools18/bin"' >>~/.bash_profile source ~/.bash_profile msg_ok "Installed SQL Server Tools" -read -r -p "Do you want to run the SQL server setup now? (Later is also possible) " prompt +read -r -p "${TAB3}Do you want to run the SQL server setup now? (Later is also possible) " prompt if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then /opt/mssql/bin/mssql-conf setup else