mirror of
				https://github.com/community-scripts/ProxmoxVE.git
				synced 2025-11-04 02:12:49 +00:00 
			
		
		
		
	Update scripts that use read -p (#4498)
This commit is contained in:
		@@ -184,7 +184,7 @@ msg_info "Installing Dependencies"
 | 
				
			|||||||
$STD apt-get install -y ...
 | 
					$STD apt-get install -y ...
 | 
				
			||||||
msg_ok "Installed Dependencies"
 | 
					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**
 | 
					### 6.2 **Verbosity**
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -151,7 +151,7 @@ EOF
 | 
				
			|||||||
    systemctl start homarr
 | 
					    systemctl start homarr
 | 
				
			||||||
    msg_ok "Started Services"
 | 
					    msg_ok "Started Services"
 | 
				
			||||||
    msg_ok "Updated Successfully"
 | 
					    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
 | 
					    if [[ "$choice" =~ ^[Yy]$ ]]; then
 | 
				
			||||||
      reboot
 | 
					      reboot
 | 
				
			||||||
    fi
 | 
					    fi
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -114,7 +114,7 @@ function update_script() {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  if [ "$UPD" == "3" ]; then
 | 
					  if [ "$UPD" == "3" ]; then
 | 
				
			||||||
    set +Eeuo pipefail
 | 
					    set +Eeuo pipefail
 | 
				
			||||||
    read -r -p "Would you like to use No Authentication? <y/N> " prompt
 | 
					    read -r -p "${TAB3}Would you like to use No Authentication? <y/N> " prompt
 | 
				
			||||||
    msg_info "Installing FileBrowser"
 | 
					    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')
 | 
					    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
 | 
					    $STD curl -fsSL https://github.com/filebrowser/filebrowser/releases/download/$RELEASE/linux-amd64-filebrowser.tar.gz | tar -xzv -C /usr/local/bin
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -29,13 +29,13 @@ $STD rc-update add docker default
 | 
				
			|||||||
msg_ok "Installed Docker"
 | 
					msg_ok "Installed Docker"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
get_latest_release() {
 | 
					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")
 | 
					PORTAINER_LATEST_VERSION=$(get_latest_release "portainer/portainer")
 | 
				
			||||||
DOCKER_COMPOSE_LATEST_VERSION=$(get_latest_release "docker/compose")
 | 
					DOCKER_COMPOSE_LATEST_VERSION=$(get_latest_release "docker/compose")
 | 
				
			||||||
PORTAINER_AGENT_LATEST_VERSION=$(get_latest_release "portainer/agent")
 | 
					PORTAINER_AGENT_LATEST_VERSION=$(get_latest_release "portainer/agent")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
read -r -p "Would you like to add Portainer? <y/N> " prompt
 | 
					read -r -p "${TAB3}Would you like to add Portainer? <y/N> " prompt
 | 
				
			||||||
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
 | 
					if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
 | 
				
			||||||
  msg_info "Installing Portainer $PORTAINER_LATEST_VERSION"
 | 
					  msg_info "Installing Portainer $PORTAINER_LATEST_VERSION"
 | 
				
			||||||
  docker volume create portainer_data >/dev/null
 | 
					  docker volume create portainer_data >/dev/null
 | 
				
			||||||
@@ -49,7 +49,7 @@ if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
 | 
				
			|||||||
    portainer/portainer-ce:latest
 | 
					    portainer/portainer-ce:latest
 | 
				
			||||||
  msg_ok "Installed Portainer $PORTAINER_LATEST_VERSION"
 | 
					  msg_ok "Installed Portainer $PORTAINER_LATEST_VERSION"
 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
  read -r -p "Would you like to add the Portainer Agent? <y/N> " prompt
 | 
					  read -r -p "${TAB3}Would you like to add the Portainer Agent? <y/N> " prompt
 | 
				
			||||||
  if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
 | 
					  if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
 | 
				
			||||||
    msg_info "Installing Portainer agent $PORTAINER_AGENT_LATEST_VERSION"
 | 
					    msg_info "Installing Portainer agent $PORTAINER_AGENT_LATEST_VERSION"
 | 
				
			||||||
    $STD docker run -d \
 | 
					    $STD docker run -d \
 | 
				
			||||||
@@ -62,13 +62,13 @@ else
 | 
				
			|||||||
    msg_ok "Installed Portainer Agent $PORTAINER_AGENT_LATEST_VERSION"
 | 
					    msg_ok "Installed Portainer Agent $PORTAINER_AGENT_LATEST_VERSION"
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
read -r -p "Would you like to add Docker Compose? <y/N> " prompt
 | 
					read -r -p "${TAB3}Would you like to add Docker Compose? <y/N> " prompt
 | 
				
			||||||
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
 | 
					if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
 | 
				
			||||||
  msg_info "Installing Docker Compose $DOCKER_COMPOSE_LATEST_VERSION"
 | 
					  msg_info "Installing Docker Compose $DOCKER_COMPOSE_LATEST_VERSION"
 | 
				
			||||||
  DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker}
 | 
					  DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker}
 | 
				
			||||||
  mkdir -p $DOCKER_CONFIG/cli-plugins
 | 
					  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
 | 
					  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
 | 
					  chmod +x "$DOCKER_CONFIG"/cli-plugins/docker-compose
 | 
				
			||||||
  msg_ok "Installed Docker Compose $DOCKER_COMPOSE_LATEST_VERSION"
 | 
					  msg_ok "Installed Docker Compose $DOCKER_COMPOSE_LATEST_VERSION"
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -26,11 +26,11 @@ $STD rc-update add docker boot
 | 
				
			|||||||
$STD service docker start
 | 
					$STD service docker start
 | 
				
			||||||
msg_ok "Enabled Docker Service"
 | 
					msg_ok "Enabled Docker Service"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
echo "Choose the database for Komodo installation:"
 | 
					echo "${TAB3}Choose the database for Komodo installation:"
 | 
				
			||||||
echo "1) MongoDB (recommended)"
 | 
					echo "${TAB3}1) MongoDB (recommended)"
 | 
				
			||||||
echo "2) SQLite"
 | 
					echo "${TAB3}2) SQLite"
 | 
				
			||||||
echo "3) PostgreSQL"
 | 
					echo "${TAB3}3) PostgreSQL"
 | 
				
			||||||
read -rp "Enter your choice (default: 1): " DB_CHOICE
 | 
					read -rp "${TAB3}Enter your choice (default: 1): " DB_CHOICE
 | 
				
			||||||
DB_CHOICE=${DB_CHOICE:-1}
 | 
					DB_CHOICE=${DB_CHOICE:-1}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
case $DB_CHOICE in
 | 
					case $DB_CHOICE in
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -29,7 +29,7 @@ mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql >/dev/null
 | 
				
			|||||||
$STD rc-service mariadb start
 | 
					$STD rc-service mariadb start
 | 
				
			||||||
msg_ok "MariaDB Configured"
 | 
					msg_ok "MariaDB Configured"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
read -r -p "Would you like to install Adminer with lighttpd? <y/N>: " prompt
 | 
					read -r -p "${TAB3}Would you like to install Adminer with lighttpd? <y/N>: " prompt
 | 
				
			||||||
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
 | 
					if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
 | 
				
			||||||
  msg_info "Installing Adminer and dependencies"
 | 
					  msg_info "Installing Adminer and dependencies"
 | 
				
			||||||
  $STD apk add --no-cache \
 | 
					  $STD apk add --no-cache \
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -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
 | 
					$STD rc-service postgresql restart
 | 
				
			||||||
msg_ok "Configured and Restarted PostgreSQL"
 | 
					msg_ok "Configured and Restarted PostgreSQL"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
read -r -p "Would you like to install Adminer with lighttpd? <y/N>: " prompt
 | 
					read -r -p "${TAB3}Would you like to install Adminer with lighttpd? <y/N>: " prompt
 | 
				
			||||||
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
 | 
					if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
 | 
				
			||||||
  msg_info "Installing Adminer and dependencies"
 | 
					  msg_info "Installing Adminer and dependencies"
 | 
				
			||||||
  $STD apk add --no-cache \
 | 
					  $STD apk add --no-cache \
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -21,7 +21,7 @@ msg_info "Installing Traefik"
 | 
				
			|||||||
$STD apk add traefik --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community
 | 
					$STD apk add traefik --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community
 | 
				
			||||||
msg_ok "Installed Traefik"
 | 
					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
 | 
					if [[ "$enable_webui" =~ ^[Yy]$ ]]; then
 | 
				
			||||||
  msg_info "Configuring Traefik WebUI"
 | 
					  msg_info "Configuring Traefik WebUI"
 | 
				
			||||||
  mkdir -p /etc/traefik/config
 | 
					  mkdir -p /etc/traefik/config
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -46,7 +46,7 @@ $STD rc-update add sysctl
 | 
				
			|||||||
$STD sysctl -p /etc/sysctl.conf
 | 
					$STD sysctl -p /etc/sysctl.conf
 | 
				
			||||||
msg_ok "Installed WireGuard"
 | 
					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
 | 
					if [[ "$INSTALL_WGD" =~ ^[Yy]$ ]]; then
 | 
				
			||||||
  msg_info "Installing additional dependencies for WGDashboard"
 | 
					  msg_info "Installing additional dependencies for WGDashboard"
 | 
				
			||||||
  $STD apk add --no-cache \
 | 
					  $STD apk add --no-cache \
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -15,10 +15,10 @@ update_os
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
msg_info "Installing Dependencies"
 | 
					msg_info "Installing Dependencies"
 | 
				
			||||||
$STD apt-get install -y \
 | 
					$STD apt-get install -y \
 | 
				
			||||||
    gnupg2 \
 | 
					  gnupg2 \
 | 
				
			||||||
    lsb-release \
 | 
					  lsb-release \
 | 
				
			||||||
    gpg \
 | 
					  gpg \
 | 
				
			||||||
    apt-transport-https
 | 
					  apt-transport-https
 | 
				
			||||||
msg_ok "Installed Dependencies"
 | 
					msg_ok "Installed Dependencies"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
msg_info "Setting up Adoptium Repository"
 | 
					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
 | 
					$STD apt-get update
 | 
				
			||||||
msg_ok "Set up Adoptium Repository"
 | 
					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
 | 
					case $version in
 | 
				
			||||||
9)
 | 
					9)
 | 
				
			||||||
    TOMCAT_VERSION="9"
 | 
					  TOMCAT_VERSION="9"
 | 
				
			||||||
    echo "Which LTS Java version would you like to use? (8, 11, 17, 21): "
 | 
					  echo "Which LTS Java version would you like to use? (8, 11, 17, 21): "
 | 
				
			||||||
    read -r jdk_version
 | 
					  read -r jdk_version
 | 
				
			||||||
    case $jdk_version in
 | 
					  case $jdk_version in
 | 
				
			||||||
    8)
 | 
					  8)
 | 
				
			||||||
        msg_info "Installing Temurin JDK 8 (LTS) for Tomcat $TOMCAT_VERSION"
 | 
					    msg_info "Installing Temurin JDK 8 (LTS) for Tomcat $TOMCAT_VERSION"
 | 
				
			||||||
        $STD apt-get install -y temurin-8-jdk
 | 
					    $STD apt-get install -y temurin-8-jdk
 | 
				
			||||||
        msg_ok "Setup Temurin JDK 8 (LTS)"
 | 
					    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
 | 
					 | 
				
			||||||
    ;;
 | 
					    ;;
 | 
				
			||||||
10 | 10.1)
 | 
					  11)
 | 
				
			||||||
    TOMCAT_VERSION="10"
 | 
					    msg_info "Installing Temurin JDK 11 (LTS) for Tomcat $TOMCAT_VERSION"
 | 
				
			||||||
    echo "Which LTS Java version would you like to use? (11, 17): "
 | 
					    $STD apt-get install -y temurin-11-jdk
 | 
				
			||||||
    read -r jdk_version
 | 
					    msg_ok "Setup Temurin JDK 11 (LTS)"
 | 
				
			||||||
    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)
 | 
					  17)
 | 
				
			||||||
    TOMCAT_VERSION="11"
 | 
					    msg_info "Installing Temurin JDK 17 (LTS) for Tomcat $TOMCAT_VERSION"
 | 
				
			||||||
    echo "Which LTS Java version would you like to use? (17, 21): "
 | 
					    $STD apt-get install -qqy temurin-17-jdk
 | 
				
			||||||
    read -r jdk_version
 | 
					    msg_ok "Setup Temurin JDK 17 (LTS)"
 | 
				
			||||||
    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
 | 
					 | 
				
			||||||
    ;;
 | 
					    ;;
 | 
				
			||||||
*)
 | 
					  21)
 | 
				
			||||||
    msg_error "Invalid Tomcat version selected. Please enter 9, 10.1 or 11."
 | 
					    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
 | 
					    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
 | 
					esac
 | 
				
			||||||
 | 
					
 | 
				
			||||||
msg_info "Installing Tomcat $TOMCAT_VERSION"
 | 
					msg_info "Installing Tomcat $TOMCAT_VERSION"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -17,7 +17,7 @@ msg_info "Installing Aria2"
 | 
				
			|||||||
$STD apt-get install -y aria2
 | 
					$STD apt-get install -y aria2
 | 
				
			||||||
msg_ok "Installed Aria2"
 | 
					msg_ok "Installed Aria2"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
read -r -p "Would you like to add AriaNG? <y/N> " prompt
 | 
					read -r -p "${TAB3}Would you like to add AriaNG? <y/N> " prompt
 | 
				
			||||||
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
 | 
					if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
 | 
				
			||||||
  msg_info "Installing AriaNG"
 | 
					  msg_info "Installing AriaNG"
 | 
				
			||||||
  $STD apt-get install -y nginx
 | 
					  $STD apt-get install -y nginx
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -19,7 +19,7 @@ curl -fsSL "https://github.com/authelia/authelia/releases/download/${RELEASE}/au
 | 
				
			|||||||
$STD dpkg -i "authelia_${RELEASE}_amd64.deb"
 | 
					$STD dpkg -i "authelia_${RELEASE}_amd64.deb"
 | 
				
			||||||
msg_ok "Install Authelia completed"
 | 
					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"
 | 
					msg_info "Setting Authelia up"
 | 
				
			||||||
touch /etc/authelia/emails.txt
 | 
					touch /etc/authelia/emails.txt
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -15,7 +15,7 @@ update_os
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
msg_info "Installing Dependencies"
 | 
					msg_info "Installing Dependencies"
 | 
				
			||||||
$STD apt-get install -y \
 | 
					$STD apt-get install -y \
 | 
				
			||||||
    gnupg
 | 
					  gnupg
 | 
				
			||||||
msg_ok "Installed Dependencies"
 | 
					msg_ok "Installed Dependencies"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
msg_info "Setting up Node.js Repository"
 | 
					msg_info "Setting up Node.js Repository"
 | 
				
			||||||
@@ -43,7 +43,7 @@ $STD npm install
 | 
				
			|||||||
echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"
 | 
					echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"
 | 
				
			||||||
msg_ok "Installed ByteStash"
 | 
					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"
 | 
					msg_info "Creating Service"
 | 
				
			||||||
cat <<EOF >/etc/systemd/system/bytestash-backend.service
 | 
					cat <<EOF >/etc/systemd/system/bytestash-backend.service
 | 
				
			||||||
@@ -62,7 +62,7 @@ WantedBy=multi-user.target
 | 
				
			|||||||
EOF
 | 
					EOF
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [[ "$allowreg" =~ ^[Yy]$ ]]; then
 | 
					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
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
cat <<EOF >/etc/systemd/system/bytestash-frontend.service
 | 
					cat <<EOF >/etc/systemd/system/bytestash-frontend.service
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -28,7 +28,7 @@ $STD apt-get update
 | 
				
			|||||||
$STD apt-get install -y caddy
 | 
					$STD apt-get install -y caddy
 | 
				
			||||||
msg_ok "Installed Caddy"
 | 
					msg_ok "Installed Caddy"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
read -r -p "Would you like to install xCaddy Addon? <y/N> " prompt
 | 
					read -r -p "${TAB3}Would you like to install xCaddy Addon? <y/N> " prompt
 | 
				
			||||||
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
 | 
					if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
 | 
				
			||||||
  msg_info "Installing Golang"
 | 
					  msg_info "Installing Golang"
 | 
				
			||||||
  set +o pipefail
 | 
					  set +o pipefail
 | 
				
			||||||
@@ -46,7 +46,7 @@ if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
 | 
				
			|||||||
  cd /opt
 | 
					  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) }')
 | 
					  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")
 | 
					  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*
 | 
					  rm -rf /opt/xcaddy*
 | 
				
			||||||
  $STD xcaddy build
 | 
					  $STD xcaddy build
 | 
				
			||||||
  msg_ok "Setup xCaddy"
 | 
					  msg_ok "Setup xCaddy"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -22,7 +22,7 @@ $STD apt-get update
 | 
				
			|||||||
$STD apt-get install -y cloudflared
 | 
					$STD apt-get install -y cloudflared
 | 
				
			||||||
msg_ok "Installed Cloudflared"
 | 
					msg_ok "Installed Cloudflared"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
read -r -p "Would you like to configure cloudflared as a DNS-over-HTTPS (DoH) proxy? <y/N> " prompt
 | 
					read -r -p "${TAB3}Would you like to configure cloudflared as a DNS-over-HTTPS (DoH) proxy? <y/N> " prompt
 | 
				
			||||||
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
 | 
					if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
 | 
				
			||||||
  msg_info "Creating Service"
 | 
					  msg_info "Creating Service"
 | 
				
			||||||
  cat <<EOF >/usr/local/etc/cloudflared/config.yml
 | 
					  cat <<EOF >/usr/local/etc/cloudflared/config.yml
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -15,8 +15,8 @@ update_os
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
msg_info "Installing Dependencies"
 | 
					msg_info "Installing Dependencies"
 | 
				
			||||||
$STD apt-get install -y \
 | 
					$STD apt-get install -y \
 | 
				
			||||||
    gnupg \
 | 
					  gnupg \
 | 
				
			||||||
    git
 | 
					  git
 | 
				
			||||||
msg_ok "Installed Dependencies"
 | 
					msg_ok "Installed Dependencies"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
msg_info "Setting up Node.js Repository"
 | 
					msg_info "Setting up Node.js Repository"
 | 
				
			||||||
@@ -30,7 +30,7 @@ $STD apt-get update
 | 
				
			|||||||
$STD apt-get install -y nodejs
 | 
					$STD apt-get install -y nodejs
 | 
				
			||||||
msg_ok "Setup Node.js"
 | 
					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}"
 | 
					msg_info "Setup ${APPLICATION}"
 | 
				
			||||||
temp_file=$(mktemp)
 | 
					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 "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
 | 
					sed -i "80s#//httpAddress: 'localhost'#httpAddress: '0.0.0.0'#g" /opt/cryptpad/config/config.js
 | 
				
			||||||
if [[ "$onlyoffice" =~ ^[Yy]$ ]]; then
 | 
					if [[ "$onlyoffice" =~ ^[Yy]$ ]]; then
 | 
				
			||||||
    $STD bash -c "./install-onlyoffice.sh --accept-license"
 | 
					  $STD bash -c "./install-onlyoffice.sh --accept-license"
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
 | 
					echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
 | 
				
			||||||
msg_ok "Setup ${APPLICATION}"
 | 
					msg_ok "Setup ${APPLICATION}"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -14,7 +14,7 @@ network_check
 | 
				
			|||||||
update_os
 | 
					update_os
 | 
				
			||||||
 | 
					
 | 
				
			||||||
get_latest_release() {
 | 
					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")
 | 
					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)
 | 
					$STD sh <(curl -fsSL https://get.docker.com)
 | 
				
			||||||
msg_ok "Installed Docker $DOCKER_LATEST_VERSION"
 | 
					msg_ok "Installed Docker $DOCKER_LATEST_VERSION"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
read -r -p "Would you like to add Portainer? <y/N> " prompt
 | 
					read -r -p "${TAB3}Would you like to add Portainer? <y/N> " prompt
 | 
				
			||||||
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
 | 
					if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
 | 
				
			||||||
  msg_info "Installing Portainer $PORTAINER_LATEST_VERSION"
 | 
					  msg_info "Installing Portainer $PORTAINER_LATEST_VERSION"
 | 
				
			||||||
  docker volume create portainer_data >/dev/null
 | 
					  docker volume create portainer_data >/dev/null
 | 
				
			||||||
@@ -43,7 +43,7 @@ if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
 | 
				
			|||||||
    portainer/portainer-ce:latest
 | 
					    portainer/portainer-ce:latest
 | 
				
			||||||
  msg_ok "Installed Portainer $PORTAINER_LATEST_VERSION"
 | 
					  msg_ok "Installed Portainer $PORTAINER_LATEST_VERSION"
 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
  read -r -p "Would you like to add the Portainer Agent? <y/N> " prompt
 | 
					  read -r -p "${TAB3}Would you like to add the Portainer Agent? <y/N> " prompt
 | 
				
			||||||
  if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
 | 
					  if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
 | 
				
			||||||
    msg_info "Installing Portainer agent $PORTAINER_AGENT_LATEST_VERSION"
 | 
					    msg_info "Installing Portainer agent $PORTAINER_AGENT_LATEST_VERSION"
 | 
				
			||||||
    $STD docker run -d \
 | 
					    $STD docker run -d \
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -41,7 +41,7 @@ cd /opt/dockge
 | 
				
			|||||||
$STD docker compose up -d
 | 
					$STD docker compose up -d
 | 
				
			||||||
msg_ok "Installed Dockge"
 | 
					msg_ok "Installed Dockge"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
read -r -p "Would you like to add Immich? <y/N> " prompt
 | 
					read -r -p "${TAB3}Would you like to add Immich? <y/N> " prompt
 | 
				
			||||||
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
 | 
					if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
 | 
				
			||||||
  msg_info "Adding Immich compose.yaml"
 | 
					  msg_info "Adding Immich compose.yaml"
 | 
				
			||||||
  mkdir -p /opt/stacks/immich
 | 
					  mkdir -p /opt/stacks/immich
 | 
				
			||||||
@@ -50,7 +50,7 @@ if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
 | 
				
			|||||||
  msg_ok "Added Immich compose.yaml"
 | 
					  msg_ok "Added Immich compose.yaml"
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
read -r -p "Would you like to add Home Assistant? <y/N> " prompt
 | 
					read -r -p "${TAB3}Would you like to add Home Assistant? <y/N> " prompt
 | 
				
			||||||
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
 | 
					if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
 | 
				
			||||||
  msg_info "Adding Home Assistant compose.yaml"
 | 
					  msg_info "Adding Home Assistant compose.yaml"
 | 
				
			||||||
  mkdir -p /opt/stacks/homeassistant
 | 
					  mkdir -p /opt/stacks/homeassistant
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -28,7 +28,7 @@ msg_ok "Installed Dependencies"
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
msg_info "Configure Application"
 | 
					msg_info "Configure Application"
 | 
				
			||||||
var_project_name="default"
 | 
					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}'"
 | 
					echo "Target assembly: '${var_project_name}'"
 | 
				
			||||||
msg_ok "Application Configured"
 | 
					msg_ok "Application Configured"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -33,7 +33,7 @@ $STD apt-get install -y nodejs
 | 
				
			|||||||
$STD npm install -g yarn
 | 
					$STD npm install -g yarn
 | 
				
			||||||
msg_ok "Installed Node.js"
 | 
					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"
 | 
					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"
 | 
					curl -fsSL "https://packages.matrix.org/debian/matrix-org-archive-keyring.gpg" -o "/usr/share/keyrings/matrix-org-archive-keyring.gpg"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -21,7 +21,7 @@ $STD apt-get install -y \
 | 
				
			|||||||
  imagemagick
 | 
					  imagemagick
 | 
				
			||||||
msg_ok "Installed Dependencies"
 | 
					msg_ok "Installed Dependencies"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
read -r -p "Do you need the intel-media-va-driver-non-free driver for HW encoding (Debian 12 only)? <y/N> " prompt
 | 
					read -r -p "${TAB3}Do you need the intel-media-va-driver-non-free driver for HW encoding (Debian 12 only)? <y/N> " prompt
 | 
				
			||||||
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
 | 
					if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
 | 
				
			||||||
  msg_info "Installing Intel Hardware Acceleration (non-free)"
 | 
					  msg_info "Installing Intel Hardware Acceleration (non-free)"
 | 
				
			||||||
  cat <<EOF >/etc/apt/sources.list.d/non-free.list
 | 
					  cat <<EOF >/etc/apt/sources.list.d/non-free.list
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -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
 | 
					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"
 | 
					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
 | 
					if [[ $prompt == "2" ]]; then
 | 
				
			||||||
  INFLUX="2"
 | 
					  INFLUX="2"
 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
@@ -43,7 +43,7 @@ fi
 | 
				
			|||||||
$STD systemctl enable --now influxdb
 | 
					$STD systemctl enable --now influxdb
 | 
				
			||||||
msg_ok "Installed InfluxDB"
 | 
					msg_ok "Installed InfluxDB"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
read -r -p "Would you like to add Telegraf? <y/N> " prompt
 | 
					read -r -p "${TAB3}Would you like to add Telegraf? <y/N> " prompt
 | 
				
			||||||
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
 | 
					if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
 | 
				
			||||||
  msg_info "Installing Telegraf"
 | 
					  msg_info "Installing Telegraf"
 | 
				
			||||||
  $STD apt-get install -y telegraf
 | 
					  $STD apt-get install -y telegraf
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -21,9 +21,9 @@ msg_ok "Setup Python 3"
 | 
				
			|||||||
msg_info "Setup Kometa"
 | 
					msg_info "Setup Kometa"
 | 
				
			||||||
temp_file=$(mktemp)
 | 
					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) }')
 | 
					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"
 | 
					tar -xzf "$temp_file"
 | 
				
			||||||
mv Kometa-${RELEASE} /opt/kometa
 | 
					mv Kometa-"${RELEASE}" /opt/kometa
 | 
				
			||||||
cd /opt/kometa
 | 
					cd /opt/kometa
 | 
				
			||||||
$STD pip install -r requirements.txt --ignore-installed
 | 
					$STD pip install -r requirements.txt --ignore-installed
 | 
				
			||||||
mkdir -p config/assets
 | 
					mkdir -p config/assets
 | 
				
			||||||
@@ -31,10 +31,10 @@ cp config/config.yml.template config/config.yml
 | 
				
			|||||||
echo "${RELEASE}" >/opt/kometa_version.txt
 | 
					echo "${RELEASE}" >/opt/kometa_version.txt
 | 
				
			||||||
msg_ok "Setup Kometa"
 | 
					msg_ok "Setup Kometa"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
read -p "Enter your TMDb API key: " TMDBKEY
 | 
					read -p "${TAB3}nter your TMDb API key: " TMDBKEY
 | 
				
			||||||
read -p "Enter your Plex URL: " PLEXURL
 | 
					read -p "${TAB3}Enter your Plex URL: " PLEXURL
 | 
				
			||||||
read -p "Enter your Plex token: " PLEXTOKEN
 | 
					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#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/token: ####################/token: $PLEXTOKEN/g" /opt/kometa/config/config.yml
 | 
				
			||||||
sed -i -e "s/apikey: ################################/apikey: $TMDBKEY/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
 | 
					customize
 | 
				
			||||||
 | 
					
 | 
				
			||||||
msg_info "Cleaning up"
 | 
					msg_info "Cleaning up"
 | 
				
			||||||
rm -f $temp_file
 | 
					rm -f "$temp_file"
 | 
				
			||||||
$STD apt-get -y autoremove
 | 
					$STD apt-get -y autoremove
 | 
				
			||||||
$STD apt-get -y autoclean
 | 
					$STD apt-get -y autoclean
 | 
				
			||||||
msg_ok "Cleaned"
 | 
					msg_ok "Cleaned"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -37,11 +37,11 @@ $STD apt-get install -y \
 | 
				
			|||||||
  docker-compose-plugin
 | 
					  docker-compose-plugin
 | 
				
			||||||
msg_ok "Installed Docker"
 | 
					msg_ok "Installed Docker"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
echo "Choose the database for Komodo installation:"
 | 
					echo "${TAB3}Choose the database for Komodo installation:"
 | 
				
			||||||
echo "1) MongoDB (recommended)"
 | 
					echo "${TAB3}1) MongoDB (recommended)"
 | 
				
			||||||
echo "2) SQLite"
 | 
					echo "${TAB3}2) SQLite"
 | 
				
			||||||
echo "3) PostgreSQL"
 | 
					echo "${TAB3}3) PostgreSQL"
 | 
				
			||||||
read -rp "Enter your choice (default: 1): " DB_CHOICE
 | 
					read -rp "${TAB3}Enter your choice (default: 1): " DB_CHOICE
 | 
				
			||||||
DB_CHOICE=${DB_CHOICE:-1}
 | 
					DB_CHOICE=${DB_CHOICE:-1}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
case $DB_CHOICE in
 | 
					case $DB_CHOICE in
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -31,7 +31,7 @@ install_postgresql
 | 
				
			|||||||
msg_info "Installing Rust"
 | 
					msg_info "Installing Rust"
 | 
				
			||||||
curl -fsSL https://sh.rustup.rs -o rustup-init.sh
 | 
					curl -fsSL https://sh.rustup.rs -o rustup-init.sh
 | 
				
			||||||
$STD bash rustup-init.sh -y --profile minimal
 | 
					$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"
 | 
					export PATH="$HOME/.cargo/bin:$PATH"
 | 
				
			||||||
rm rustup-init.sh
 | 
					rm rustup-init.sh
 | 
				
			||||||
$STD cargo install monolith
 | 
					$STD cargo install monolith
 | 
				
			||||||
@@ -56,7 +56,7 @@ $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC';"
 | 
				
			|||||||
} >>~/linkwarden.creds
 | 
					} >>~/linkwarden.creds
 | 
				
			||||||
msg_ok "Set up PostgreSQL DB"
 | 
					msg_ok "Set up PostgreSQL DB"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
read -r -p "Would you like to add Adminer? <y/N> " prompt
 | 
					read -r -p "${TAB3}Would you like to add Adminer? <y/N> " prompt
 | 
				
			||||||
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
 | 
					if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
 | 
				
			||||||
  msg_info "Installing Adminer"
 | 
					  msg_info "Installing Adminer"
 | 
				
			||||||
  $STD apt install -y adminer
 | 
					  $STD apt install -y adminer
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -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
 | 
					sed -i 's/^bind-address/#bind-address/g' /etc/mysql/mariadb.conf.d/50-server.cnf
 | 
				
			||||||
msg_ok "Installed MariaDB"
 | 
					msg_ok "Installed MariaDB"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
read -r -p "Would you like to add PhpMyAdmin? <y/N> " prompt
 | 
					read -r -p "${TAB3}Would you like to add PhpMyAdmin? <y/N> " prompt
 | 
				
			||||||
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
 | 
					if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
 | 
				
			||||||
  msg_info "Installing phpMyAdmin"
 | 
					  msg_info "Installing phpMyAdmin"
 | 
				
			||||||
  $STD apt-get install -y \
 | 
					  $STD apt-get install -y \
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -15,7 +15,7 @@ update_os
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
msg_info "Installing Dependencies"
 | 
					msg_info "Installing Dependencies"
 | 
				
			||||||
$STD apt-get install -y \
 | 
					$STD apt-get install -y \
 | 
				
			||||||
    gnupg
 | 
					  gnupg
 | 
				
			||||||
msg_ok "Installed Dependencies"
 | 
					msg_ok "Installed Dependencies"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
msg_info "Setup ${APPLICATION}"
 | 
					msg_info "Setup ${APPLICATION}"
 | 
				
			||||||
@@ -27,49 +27,49 @@ curl -fsSL https://raw.githubusercontent.com/meilisearch/meilisearch/latest/conf
 | 
				
			|||||||
MASTER_KEY=$(openssl rand -base64 12)
 | 
					MASTER_KEY=$(openssl rand -base64 12)
 | 
				
			||||||
LOCAL_IP="$(hostname -I | awk '{print $1}')"
 | 
					LOCAL_IP="$(hostname -I | awk '{print $1}')"
 | 
				
			||||||
sed -i \
 | 
					sed -i \
 | 
				
			||||||
    -e 's|^env =.*|env = "production"|' \
 | 
					  -e 's|^env =.*|env = "production"|' \
 | 
				
			||||||
    -e "s|^# master_key =.*|master_key = \"$MASTER_KEY\"|" \
 | 
					  -e "s|^# master_key =.*|master_key = \"$MASTER_KEY\"|" \
 | 
				
			||||||
    -e 's|^db_path =.*|db_path = "/var/lib/meilisearch/data"|' \
 | 
					  -e 's|^db_path =.*|db_path = "/var/lib/meilisearch/data"|' \
 | 
				
			||||||
    -e 's|^dump_dir =.*|dump_dir = "/var/lib/meilisearch/dumps"|' \
 | 
					  -e 's|^dump_dir =.*|dump_dir = "/var/lib/meilisearch/dumps"|' \
 | 
				
			||||||
    -e 's|^snapshot_dir =.*|snapshot_dir = "/var/lib/meilisearch/snapshots"|' \
 | 
					  -e 's|^snapshot_dir =.*|snapshot_dir = "/var/lib/meilisearch/snapshots"|' \
 | 
				
			||||||
    -e 's|^# no_analytics = true|no_analytics = true|' \
 | 
					  -e 's|^# no_analytics = true|no_analytics = true|' \
 | 
				
			||||||
    -e 's|^http_addr =.*|http_addr = "0.0.0.0:7700"|' \
 | 
					  -e 's|^http_addr =.*|http_addr = "0.0.0.0:7700"|' \
 | 
				
			||||||
    /etc/meilisearch.toml
 | 
					  /etc/meilisearch.toml
 | 
				
			||||||
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
 | 
					echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
 | 
				
			||||||
msg_ok "Setup ${APPLICATION}"
 | 
					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
 | 
					if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
 | 
				
			||||||
    msg_info "Setting up Node.js Repository"
 | 
					  msg_info "Setting up Node.js Repository"
 | 
				
			||||||
    mkdir -p /etc/apt/keyrings
 | 
					  mkdir -p /etc/apt/keyrings
 | 
				
			||||||
    curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
 | 
					  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
 | 
					  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_ok "Set up Node.js Repository"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    msg_info "Installing Node.js"
 | 
					  msg_info "Installing Node.js"
 | 
				
			||||||
    $STD apt-get update
 | 
					  $STD apt-get update
 | 
				
			||||||
    $STD apt-get install -y nodejs
 | 
					  $STD apt-get install -y nodejs
 | 
				
			||||||
    $STD npm install -g pnpm
 | 
					  $STD npm install -g pnpm
 | 
				
			||||||
    msg_ok "Installed Node.js"
 | 
					  msg_ok "Installed Node.js"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    msg_info "Setup ${APPLICATION}-ui"
 | 
					  msg_info "Setup ${APPLICATION}-ui"
 | 
				
			||||||
    tmp_file=$(mktemp)
 | 
					  tmp_file=$(mktemp)
 | 
				
			||||||
    tmp_dir=$(mktemp -d)
 | 
					  tmp_dir=$(mktemp -d)
 | 
				
			||||||
    mkdir -p /opt/meilisearch-ui
 | 
					  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) }')
 | 
					  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
 | 
					  curl -fsSL "https://github.com/riccox/meilisearch-ui/archive/refs/tags/${RELEASE_UI}.zip" -o "$tmp_file"
 | 
				
			||||||
    unzip -q "$tmp_file" -d "$tmp_dir"
 | 
					  unzip -q "$tmp_file" -d "$tmp_dir"
 | 
				
			||||||
    mv "$tmp_dir"/*/* /opt/meilisearch-ui/
 | 
					  mv "$tmp_dir"/*/* /opt/meilisearch-ui/
 | 
				
			||||||
    cd /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
 | 
					  sed -i 's|const hash = execSync("git rev-parse HEAD").toString().trim();|const hash = "unknown";|' /opt/meilisearch-ui/vite.config.ts
 | 
				
			||||||
    $STD pnpm install
 | 
					  $STD pnpm install
 | 
				
			||||||
    cat <<EOF > /opt/meilisearch-ui/.env.local
 | 
					  cat <<EOF >/opt/meilisearch-ui/.env.local
 | 
				
			||||||
VITE_SINGLETON_MODE=true
 | 
					VITE_SINGLETON_MODE=true
 | 
				
			||||||
VITE_SINGLETON_HOST=http://${LOCAL_IP}:7700
 | 
					VITE_SINGLETON_HOST=http://${LOCAL_IP}:7700
 | 
				
			||||||
VITE_SINGLETON_API_KEY=${MASTER_KEY}
 | 
					VITE_SINGLETON_API_KEY=${MASTER_KEY}
 | 
				
			||||||
EOF
 | 
					EOF
 | 
				
			||||||
    echo "${RELEASE_UI}" >/opt/${APPLICATION}-ui_version.txt
 | 
					  echo "${RELEASE_UI}" >/opt/${APPLICATION}-ui_version.txt
 | 
				
			||||||
    msg_ok "Setup ${APPLICATION}-ui"
 | 
					  msg_ok "Setup ${APPLICATION}-ui"
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
msg_info "Setting up Services"
 | 
					msg_info "Setting up Services"
 | 
				
			||||||
@@ -88,7 +88,7 @@ EOF
 | 
				
			|||||||
systemctl enable -q --now meilisearch
 | 
					systemctl enable -q --now meilisearch
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
 | 
					if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
 | 
				
			||||||
cat <<EOF > /etc/systemd/system/meilisearch-ui.service
 | 
					  cat <<EOF >/etc/systemd/system/meilisearch-ui.service
 | 
				
			||||||
[Unit]
 | 
					[Unit]
 | 
				
			||||||
Description=Meilisearch UI Service
 | 
					Description=Meilisearch UI Service
 | 
				
			||||||
After=network.target meilisearch.service
 | 
					After=network.target meilisearch.service
 | 
				
			||||||
@@ -107,12 +107,11 @@ SyslogIdentifier=meilisearch-ui
 | 
				
			|||||||
[Install]
 | 
					[Install]
 | 
				
			||||||
WantedBy=multi-user.target
 | 
					WantedBy=multi-user.target
 | 
				
			||||||
EOF
 | 
					EOF
 | 
				
			||||||
systemctl enable -q --now meilisearch-ui
 | 
					  systemctl enable -q --now meilisearch-ui
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
msg_ok "Set up Services"
 | 
					msg_ok "Set up Services"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
motd_ssh
 | 
					motd_ssh
 | 
				
			||||||
customize
 | 
					customize
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -17,7 +17,7 @@ msg_info "Installing Dependencies"
 | 
				
			|||||||
$STD apt-get install -y gnupg
 | 
					$STD apt-get install -y gnupg
 | 
				
			||||||
msg_ok "Installed Dependencies"
 | 
					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
 | 
					if [[ "$install_mongodb_8" =~ ^[Yy]$ ]]; then
 | 
				
			||||||
  MONGODB_VERSION="8.0"
 | 
					  MONGODB_VERSION="8.0"
 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -22,7 +22,7 @@ msg_ok "Installed Dependencies"
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
RELEASE_REPO="mysql-8.0"
 | 
					RELEASE_REPO="mysql-8.0"
 | 
				
			||||||
RELEASE_AUTH="mysql_native_password"
 | 
					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)? <y/N> " prompt
 | 
					read -r -p "${TAB3}Would you like to install the MySQL 8.4 LTS release instead of MySQL 8.0 (bug fix track; EOL April-2026)? <y/N> " prompt
 | 
				
			||||||
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
 | 
					if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
 | 
				
			||||||
  RELEASE_REPO="mysql-8.4-lts"
 | 
					  RELEASE_REPO="mysql-8.4-lts"
 | 
				
			||||||
  RELEASE_AUTH="caching_sha2_password"
 | 
					  RELEASE_AUTH="caching_sha2_password"
 | 
				
			||||||
@@ -50,7 +50,7 @@ echo -e "MySQL user: root" >>~/mysql.creds
 | 
				
			|||||||
echo -e "MySQL password: $ADMIN_PASS" >>~/mysql.creds
 | 
					echo -e "MySQL password: $ADMIN_PASS" >>~/mysql.creds
 | 
				
			||||||
msg_ok "MySQL Server configured"
 | 
					msg_ok "MySQL Server configured"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
read -r -p "Would you like to add PhpMyAdmin? <y/N> " prompt
 | 
					read -r -p "${TAB3}Would you like to add PhpMyAdmin? <y/N> " prompt
 | 
				
			||||||
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
 | 
					if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
 | 
				
			||||||
  msg_info "Installing phpMyAdmin"
 | 
					  msg_info "Installing phpMyAdmin"
 | 
				
			||||||
  $STD apt-get install -y \
 | 
					  $STD apt-get install -y \
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -15,7 +15,7 @@ update_os
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
msg_info "Installing Dependencies (Patience)"
 | 
					msg_info "Installing Dependencies (Patience)"
 | 
				
			||||||
$STD apt-get install -y \
 | 
					$STD apt-get install -y \
 | 
				
			||||||
    ffmpeg
 | 
					  ffmpeg
 | 
				
			||||||
msg_ok "Installed Dependencies"
 | 
					msg_ok "Installed Dependencies"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
msg_info "Installing Navidrome"
 | 
					msg_info "Installing Navidrome"
 | 
				
			||||||
@@ -27,9 +27,9 @@ systemctl enable -q --now navidrome
 | 
				
			|||||||
echo "${RELEASE}" >/opt/Navidrome_version.txt
 | 
					echo "${RELEASE}" >/opt/Navidrome_version.txt
 | 
				
			||||||
msg_ok "Installed Navidrome"
 | 
					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
 | 
					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
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
motd_ssh
 | 
					motd_ssh
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -62,7 +62,7 @@ RELEASE=$(curl -fsSL https://api.github.com/repos/NginxProxyManager/nginx-proxy-
 | 
				
			|||||||
  grep "tag_name" |
 | 
					  grep "tag_name" |
 | 
				
			||||||
  awk '{print substr($2, 3, length($2)-4) }')
 | 
					  awk '{print substr($2, 3, length($2)-4) }')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
read -r -p "Would you like to install an older version (v2.10.4)? <y/N> " prompt
 | 
					read -r -p "${TAB3}Would you like to install an older version (v2.10.4)? <y/N> " prompt
 | 
				
			||||||
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
 | 
					if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
 | 
				
			||||||
  msg_info "Downloading Nginx Proxy Manager v2.10.4"
 | 
					  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
 | 
					  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
 | 
					else
 | 
				
			||||||
  msg_info "Downloading Nginx Proxy Manager v${RELEASE}"
 | 
					  msg_info "Downloading Nginx Proxy Manager v${RELEASE}"
 | 
				
			||||||
  curl -fsSL "https://codeload.github.com/NginxProxyManager/nginx-proxy-manager/tar.gz/v${RELEASE}" | tar -xz
 | 
					  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}"
 | 
					  msg_ok "Downloaded Nginx Proxy Manager v${RELEASE}"
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
msg_info "Setting up Environment"
 | 
					msg_info "Setting up Environment"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -15,9 +15,9 @@ update_os
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
msg_info "Installing Dependencies"
 | 
					msg_info "Installing Dependencies"
 | 
				
			||||||
$STD apk add \
 | 
					$STD apk add \
 | 
				
			||||||
    tzdata \
 | 
					  tzdata \
 | 
				
			||||||
    gawk \
 | 
					  gawk \
 | 
				
			||||||
    yq
 | 
					  yq
 | 
				
			||||||
msg_ok "Installed Dependencies"
 | 
					msg_ok "Installed Dependencies"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
msg_info "Installing Docker & Compose"
 | 
					msg_info "Installing Docker & Compose"
 | 
				
			||||||
@@ -26,7 +26,7 @@ $STD rc-service docker start
 | 
				
			|||||||
$STD rc-update add docker default
 | 
					$STD rc-update add docker default
 | 
				
			||||||
 | 
					
 | 
				
			||||||
get_latest_release() {
 | 
					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_COMPOSE_LATEST_VERSION=$(get_latest_release "docker/compose")
 | 
				
			||||||
DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker}
 | 
					DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker}
 | 
				
			||||||
@@ -42,20 +42,20 @@ msg_ok "Fetched NPMplus"
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
attempts=0
 | 
					attempts=0
 | 
				
			||||||
while true; do
 | 
					while true; do
 | 
				
			||||||
    read -r -p "Enter your TZ Identifier (e.g., Europe/Berlin): " TZ_INPUT
 | 
					  read -r -p "${TAB3}Enter your TZ Identifier (e.g., Europe/Berlin): " TZ_INPUT
 | 
				
			||||||
    if validate_tz "$TZ_INPUT"; then
 | 
					  if validate_tz "$TZ_INPUT"; then
 | 
				
			||||||
        break
 | 
					    break
 | 
				
			||||||
    fi
 | 
					  fi
 | 
				
			||||||
    msg_error "Invalid timezone! Please enter a valid TZ identifier."
 | 
					  msg_error "Invalid timezone! Please enter a valid TZ identifier."
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    attempts=$((attempts + 1))
 | 
					  attempts=$((attempts + 1))
 | 
				
			||||||
    if [[ "$attempts" -ge 3 ]]; then
 | 
					  if [[ "$attempts" -ge 3 ]]; then
 | 
				
			||||||
        msg_error "Maximum attempts reached. Exiting."
 | 
					    msg_error "Maximum attempts reached. Exiting."
 | 
				
			||||||
        exit 1
 | 
					    exit 1
 | 
				
			||||||
    fi
 | 
					  fi
 | 
				
			||||||
done
 | 
					done
 | 
				
			||||||
 | 
					
 | 
				
			||||||
read -r -p "Enter your ACME Email: " ACME_EMAIL_INPUT
 | 
					read -r -p "${TAB3}Enter your ACME Email: " ACME_EMAIL_INPUT
 | 
				
			||||||
 | 
					
 | 
				
			||||||
yq -i "
 | 
					yq -i "
 | 
				
			||||||
  .services.npmplus.environment |=
 | 
					  .services.npmplus.environment |=
 | 
				
			||||||
@@ -67,20 +67,20 @@ msg_info "Building and Starting NPMplus (Patience)"
 | 
				
			|||||||
$STD docker compose up -d
 | 
					$STD docker compose up -d
 | 
				
			||||||
CONTAINER_ID=""
 | 
					CONTAINER_ID=""
 | 
				
			||||||
for i in {1..60}; do
 | 
					for i in {1..60}; do
 | 
				
			||||||
    CONTAINER_ID=$(docker ps --filter "name=npmplus" --format "{{.ID}}")
 | 
					  CONTAINER_ID=$(docker ps --filter "name=npmplus" --format "{{.ID}}")
 | 
				
			||||||
    if [[ -n "$CONTAINER_ID" ]]; then
 | 
					  if [[ -n "$CONTAINER_ID" ]]; then
 | 
				
			||||||
        STATUS=$(docker inspect --format '{{.State.Health.Status}}' "$CONTAINER_ID" 2>/dev/null || echo "starting")
 | 
					    STATUS=$(docker inspect --format '{{.State.Health.Status}}' "$CONTAINER_ID" 2>/dev/null || echo "starting")
 | 
				
			||||||
        if [[ "$STATUS" == "healthy" ]]; then
 | 
					    if [[ "$STATUS" == "healthy" ]]; then
 | 
				
			||||||
            msg_ok "NPMplus is running and healthy"
 | 
					      msg_ok "NPMplus is running and healthy"
 | 
				
			||||||
            break
 | 
					      break
 | 
				
			||||||
        elif [[ "$STATUS" == "unhealthy" ]]; then
 | 
					    elif [[ "$STATUS" == "unhealthy" ]]; then
 | 
				
			||||||
            msg_error "NPMplus container is unhealthy! Check logs."
 | 
					      msg_error "NPMplus container is unhealthy! Check logs."
 | 
				
			||||||
            docker logs "$CONTAINER_ID"
 | 
					      docker logs "$CONTAINER_ID"
 | 
				
			||||||
            exit 1
 | 
					      exit 1
 | 
				
			||||||
        fi
 | 
					 | 
				
			||||||
    fi
 | 
					    fi
 | 
				
			||||||
    sleep 2
 | 
					  fi
 | 
				
			||||||
    [[ $i -eq 60 ]] && msg_error "NPMplus container did not become healthy within 120s." && docker logs "$CONTAINER_ID" && exit 1
 | 
					  sleep 2
 | 
				
			||||||
 | 
					  [[ $i -eq 60 ]] && msg_error "NPMplus container did not become healthy within 120s." && docker logs "$CONTAINER_ID" && exit 1
 | 
				
			||||||
done
 | 
					done
 | 
				
			||||||
msg_ok "Builded and started NPMplus"
 | 
					msg_ok "Builded and started NPMplus"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -90,18 +90,18 @@ customize
 | 
				
			|||||||
msg_info "Retrieving Default Login (Patience)"
 | 
					msg_info "Retrieving Default Login (Patience)"
 | 
				
			||||||
PASSWORD_FOUND=0
 | 
					PASSWORD_FOUND=0
 | 
				
			||||||
for i in {1..60}; do
 | 
					for i in {1..60}; do
 | 
				
			||||||
    PASSWORD_LINE=$(docker logs "$CONTAINER_ID" 2>&1 | awk '/Creating a new user:/ { print; exit }')
 | 
					  PASSWORD_LINE=$(docker logs "$CONTAINER_ID" 2>&1 | awk '/Creating a new user:/ { print; exit }')
 | 
				
			||||||
    if [[ -n "$PASSWORD_LINE" ]]; then
 | 
					  if [[ -n "$PASSWORD_LINE" ]]; then
 | 
				
			||||||
        PASSWORD=$(echo "$PASSWORD_LINE" | awk -F 'password: ' '{print $2}')
 | 
					    PASSWORD=$(echo "$PASSWORD_LINE" | awk -F 'password: ' '{print $2}')
 | 
				
			||||||
        echo -e "username: admin@example.org\npassword: $PASSWORD" >/opt/.npm_pwd
 | 
					    echo -e "username: admin@example.org\npassword: $PASSWORD" >/opt/.npm_pwd
 | 
				
			||||||
        msg_ok "Saved default login to /opt/.npm_pwd"
 | 
					    msg_ok "Saved default login to /opt/.npm_pwd"
 | 
				
			||||||
        PASSWORD_FOUND=1
 | 
					    PASSWORD_FOUND=1
 | 
				
			||||||
        break
 | 
					    break
 | 
				
			||||||
    fi
 | 
					  fi
 | 
				
			||||||
    sleep 2
 | 
					  sleep 2
 | 
				
			||||||
done
 | 
					done
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [[ $PASSWORD_FOUND -eq 0 ]]; then
 | 
					if [[ $PASSWORD_FOUND -eq 0 ]]; then
 | 
				
			||||||
    msg_error "Could not retrieve default login after 60 seconds."
 | 
					  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"
 | 
					  echo -e "\nYou can manually check the container logs with:\n  docker logs $CONTAINER_ID | grep 'Creating a new user:'\n"
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -55,7 +55,7 @@ export NODE_OPTIONS="--max-old-space-size=3584"
 | 
				
			|||||||
$STD npm run build
 | 
					$STD npm run build
 | 
				
			||||||
msg_ok "Installed Open WebUI"
 | 
					msg_ok "Installed Open WebUI"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
read -r -p "Would you like to add Ollama? <y/N> " prompt
 | 
					read -r -p "${TAB3}Would you like to add Ollama? <y/N> " prompt
 | 
				
			||||||
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
 | 
					if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
 | 
				
			||||||
  msg_info "Installing Ollama"
 | 
					  msg_info "Installing Ollama"
 | 
				
			||||||
  curl -fsSLO https://ollama.com/download/ollama-linux-amd64.tgz
 | 
					  curl -fsSLO https://ollama.com/download/ollama-linux-amd64.tgz
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -5,7 +5,7 @@
 | 
				
			|||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
 | 
					# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
 | 
				
			||||||
# Source: https://github.com/openziti/ziti
 | 
					# Source: https://github.com/openziti/ziti
 | 
				
			||||||
 | 
					
 | 
				
			||||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
 | 
					source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
 | 
				
			||||||
color
 | 
					color
 | 
				
			||||||
verb_ip6
 | 
					verb_ip6
 | 
				
			||||||
catch_errors
 | 
					catch_errors
 | 
				
			||||||
@@ -21,22 +21,22 @@ msg_info "Installing openziti"
 | 
				
			|||||||
mkdir -p --mode=0755 /usr/share/keyrings
 | 
					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
 | 
					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
 | 
					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
 | 
					$STD apt-get install -y openziti-controller openziti-console
 | 
				
			||||||
msg_ok "Installed openziti"
 | 
					msg_ok "Installed openziti"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
read -r -p "Would you like to go through the auto configuration now? <y/N>" prompt
 | 
					read -r -p "${TAB3}Would you like to go through the auto configuration now? <y/N>" prompt
 | 
				
			||||||
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
 | 
					if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
 | 
				
			||||||
  IPADDRESS=$(hostname -I | awk '{print $1}')
 | 
					  IPADDRESS=$(hostname -I | awk '{print $1}')
 | 
				
			||||||
  GEN_FQDN="controller.${IPADDRESS}.sslip.io"
 | 
					  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}
 | 
					  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}
 | 
					  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}
 | 
					  ZITI_USER=${ZITI_USER:-admin}
 | 
				
			||||||
  GEN_PWD=$(head -c128 /dev/urandom | LC_ALL=C tr -dc 'A-Za-z0-9!@#$%^*_+~' | cut -c 1-12)
 | 
					  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}
 | 
					  ZITI_PWD=${ZITI_PWD:-$GEN_PWD}
 | 
				
			||||||
  CONFIG_FILE="/opt/openziti/etc/controller/bootstrap.env"
 | 
					  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"
 | 
					  sed -i "s|^ZITI_CTRL_ADVERTISED_ADDRESS=.*|ZITI_CTRL_ADVERTISED_ADDRESS='${ZITI_CTRL_ADVERTISED_ADDRESS}'|" "$CONFIG_FILE"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -27,16 +27,16 @@ sed -i '0,/^ExecStart/ { /^ExecStart/ { n; s|^ExecStart.*|ExecStart=/opt/openzit
 | 
				
			|||||||
systemctl daemon-reload
 | 
					systemctl daemon-reload
 | 
				
			||||||
msg_ok "Installed openziti"
 | 
					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
 | 
					if [[ ${prompt} ]]; then
 | 
				
			||||||
    msg_info "Adding identity"
 | 
					  msg_info "Adding identity"
 | 
				
			||||||
    echo "${prompt}" >/opt/openziti/etc/identities/identity.jwt
 | 
					  echo "${prompt}" >/opt/openziti/etc/identities/identity.jwt
 | 
				
			||||||
    chown ziti:ziti /opt/openziti/etc/identities/identity.jwt
 | 
					  chown ziti:ziti /opt/openziti/etc/identities/identity.jwt
 | 
				
			||||||
    systemctl enable -q --now ziti-edge-tunnel
 | 
					  systemctl enable -q --now ziti-edge-tunnel
 | 
				
			||||||
    msg_ok "Service Started"
 | 
					  msg_ok "Service Started"
 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
    systemctl enable -q ziti-edge-tunnel
 | 
					  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"
 | 
					  msg_error "No identity provided; please place an identity file in /opt/openziti/etc/identities/ and restart the service"
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
motd_ssh
 | 
					motd_ssh
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -50,8 +50,8 @@ msg_info "Setup Paperless-GPT"
 | 
				
			|||||||
temp_file=$(mktemp)
 | 
					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) }')
 | 
					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"
 | 
					curl -fsSL "https://github.com/icereed/paperless-gpt/archive/refs/tags/v${RELEASE}.tar.gz" -o "$temp_file"
 | 
				
			||||||
tar zxf $temp_file
 | 
					tar zxf "$temp_file"
 | 
				
			||||||
mv paperless-gpt-${RELEASE} /opt/paperless-gpt
 | 
					mv paperless-gpt-"${RELEASE}" /opt/paperless-gpt
 | 
				
			||||||
cd /opt/paperless-gpt/web-app
 | 
					cd /opt/paperless-gpt/web-app
 | 
				
			||||||
$STD npm install
 | 
					$STD npm install
 | 
				
			||||||
$STD npm run build
 | 
					$STD npm run build
 | 
				
			||||||
@@ -64,16 +64,16 @@ echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"
 | 
				
			|||||||
msg_ok "Setup Paperless-GPT"
 | 
					msg_ok "Setup Paperless-GPT"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
mkdir -p /opt/paperless-gpt-data
 | 
					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
 | 
					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
 | 
					else
 | 
				
			||||||
  PAPERLESS_BASE_URL="http://your_paperless_ngx_url"
 | 
					  PAPERLESS_BASE_URL="http://your_paperless_ngx_url"
 | 
				
			||||||
fi
 | 
					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
 | 
					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
 | 
					else
 | 
				
			||||||
  PAPERLESS_API_TOKEN="your_paperless_api_token"
 | 
					  PAPERLESS_API_TOKEN="your_paperless_api_token"
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
@@ -129,7 +129,7 @@ motd_ssh
 | 
				
			|||||||
customize
 | 
					customize
 | 
				
			||||||
 | 
					
 | 
				
			||||||
msg_info "Cleaning up"
 | 
					msg_info "Cleaning up"
 | 
				
			||||||
rm -f $temp_file
 | 
					rm -f "$temp_file"
 | 
				
			||||||
$STD apt-get -y autoremove
 | 
					$STD apt-get -y autoremove
 | 
				
			||||||
$STD apt-get -y autoclean
 | 
					$STD apt-get -y autoclean
 | 
				
			||||||
msg_ok "Cleaned"
 | 
					msg_ok "Cleaned"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -125,7 +125,7 @@ cd /opt/paperless/src
 | 
				
			|||||||
$STD python3 manage.py migrate
 | 
					$STD python3 manage.py migrate
 | 
				
			||||||
msg_ok "Set up PostgreSQL database"
 | 
					msg_ok "Set up PostgreSQL database"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
read -r -p "Would you like to add Adminer? <y/N> " prompt
 | 
					read -r -p "${TAB3}Would you like to add Adminer? <y/N> " prompt
 | 
				
			||||||
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
 | 
					if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
 | 
				
			||||||
  msg_info "Installing Adminer"
 | 
					  msg_info "Installing Adminer"
 | 
				
			||||||
  $STD apt install -y adminer
 | 
					  $STD apt install -y adminer
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -54,9 +54,9 @@ $STD pihole-FTL --config ntp.sync.interval 0
 | 
				
			|||||||
systemctl restart pihole-FTL.service
 | 
					systemctl restart pihole-FTL.service
 | 
				
			||||||
msg_ok "Installed Pi-hole"
 | 
					msg_ok "Installed Pi-hole"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
read -r -p "Would you like to add Unbound? <y/N> " prompt
 | 
					read -r -p "${TAB3}Would you like to add Unbound? <y/N> " prompt
 | 
				
			||||||
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
 | 
					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? <y/N> " prompt
 | 
					  read -r -p "${TAB3}Unbound is configured as a recursive DNS server by default, would you like it to be configured as a forwarding DNS server (using DNS-over-TLS (DoT)) instead? <y/N> " prompt
 | 
				
			||||||
  msg_info "Installing Unbound"
 | 
					  msg_info "Installing Unbound"
 | 
				
			||||||
  $STD apt-get install -y unbound
 | 
					  $STD apt-get install -y unbound
 | 
				
			||||||
  cat <<EOF >/etc/unbound/unbound.conf.d/pi-hole.conf
 | 
					  cat <<EOF >/etc/unbound/unbound.conf.d/pi-hole.conf
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -42,7 +42,7 @@ rm -f "$temp_file"
 | 
				
			|||||||
set -o pipefail
 | 
					set -o pipefail
 | 
				
			||||||
msg_ok "Installed Golang"
 | 
					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"
 | 
					msg_info "Setup Pocket ID"
 | 
				
			||||||
cd /opt
 | 
					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) }')
 | 
					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"
 | 
					msg_ok "Cleaned"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
motd_ssh
 | 
					motd_ssh
 | 
				
			||||||
customize
 | 
					customize
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -49,7 +49,7 @@ $STD systemctl enable --now podman.socket
 | 
				
			|||||||
echo -e 'unqualified-search-registries=["docker.io"]' >>/etc/containers/registries.conf
 | 
					echo -e 'unqualified-search-registries=["docker.io"]' >>/etc/containers/registries.conf
 | 
				
			||||||
msg_ok "Installed Podman"
 | 
					msg_ok "Installed Podman"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
read -r -p "Would you like to add Portainer? <y/N> " prompt
 | 
					read -r -p "${TAB3}Would you like to add Portainer? <y/N> " prompt
 | 
				
			||||||
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
 | 
					if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
 | 
				
			||||||
  msg_info "Installing Portainer $PORTAINER_LATEST_VERSION"
 | 
					  msg_info "Installing Portainer $PORTAINER_LATEST_VERSION"
 | 
				
			||||||
  podman volume create portainer_data >/dev/null
 | 
					  podman volume create portainer_data >/dev/null
 | 
				
			||||||
@@ -63,7 +63,7 @@ if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
 | 
				
			|||||||
    portainer/portainer-ce:latest
 | 
					    portainer/portainer-ce:latest
 | 
				
			||||||
  msg_ok "Installed Portainer $PORTAINER_LATEST_VERSION"
 | 
					  msg_ok "Installed Portainer $PORTAINER_LATEST_VERSION"
 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
  read -r -p "Would you like to add the Portainer Agent? <y/N> " prompt
 | 
					  read -r -p "${TAB3}Would you like to add the Portainer Agent? <y/N> " prompt
 | 
				
			||||||
  if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
 | 
					  if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
 | 
				
			||||||
    msg_info "Installing Portainer agent $PORTAINER_AGENT_LATEST_VERSION"
 | 
					    msg_info "Installing Portainer agent $PORTAINER_AGENT_LATEST_VERSION"
 | 
				
			||||||
    podman volume create temp >/dev/null
 | 
					    podman volume create temp >/dev/null
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -49,7 +49,7 @@ $STD systemctl enable --now podman.socket
 | 
				
			|||||||
echo -e 'unqualified-search-registries=["docker.io"]' >>/etc/containers/registries.conf
 | 
					echo -e 'unqualified-search-registries=["docker.io"]' >>/etc/containers/registries.conf
 | 
				
			||||||
msg_ok "Installed Podman"
 | 
					msg_ok "Installed Podman"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
read -r -p "Would you like to add Portainer? <y/N> " prompt
 | 
					read -r -p "${TAB3}Would you like to add Portainer? <y/N> " prompt
 | 
				
			||||||
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
 | 
					if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
 | 
				
			||||||
  msg_info "Installing Portainer $PORTAINER_LATEST_VERSION"
 | 
					  msg_info "Installing Portainer $PORTAINER_LATEST_VERSION"
 | 
				
			||||||
  podman volume create portainer_data >/dev/null
 | 
					  podman volume create portainer_data >/dev/null
 | 
				
			||||||
@@ -63,7 +63,7 @@ if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
 | 
				
			|||||||
    portainer/portainer-ce:latest
 | 
					    portainer/portainer-ce:latest
 | 
				
			||||||
  msg_ok "Installed Portainer $PORTAINER_LATEST_VERSION"
 | 
					  msg_ok "Installed Portainer $PORTAINER_LATEST_VERSION"
 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
  read -r -p "Would you like to add the Portainer Agent? <y/N> " prompt
 | 
					  read -r -p "${TAB3}Would you like to add the Portainer Agent? <y/N> " prompt
 | 
				
			||||||
  if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
 | 
					  if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
 | 
				
			||||||
    msg_info "Installing Portainer agent $PORTAINER_AGENT_LATEST_VERSION"
 | 
					    msg_info "Installing Portainer agent $PORTAINER_AGENT_LATEST_VERSION"
 | 
				
			||||||
    podman volume create temp >/dev/null
 | 
					    podman volume create temp >/dev/null
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -130,7 +130,7 @@ EOF
 | 
				
			|||||||
sudo systemctl restart postgresql
 | 
					sudo systemctl restart postgresql
 | 
				
			||||||
msg_ok "Installed PostgreSQL"
 | 
					msg_ok "Installed PostgreSQL"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
read -r -p "Would you like to add Adminer? <y/N> " prompt
 | 
					read -r -p "${TAB3}Would you like to add Adminer? <y/N> " prompt
 | 
				
			||||||
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
 | 
					if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
 | 
				
			||||||
  msg_info "Installing Adminer"
 | 
					  msg_info "Installing Adminer"
 | 
				
			||||||
  $STD apt install -y adminer
 | 
					  $STD apt install -y adminer
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -53,9 +53,9 @@ $STD mysql -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH
 | 
				
			|||||||
} >>~/pterodactyl-panel.creds
 | 
					} >>~/pterodactyl-panel.creds
 | 
				
			||||||
msg_ok "Set up MariaDB"
 | 
					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 "${TAB3}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 "${TAB3}nter your First Name: " NAME_FIRST
 | 
				
			||||||
read -p "Enter your Last Name: " NAME_LAST
 | 
					read -p "${TAB3}Enter your Last Name: " NAME_LAST
 | 
				
			||||||
 | 
					
 | 
				
			||||||
msg_info "Installing pterodactyl Panel"
 | 
					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) }')
 | 
					RELEASE=$(curl -fsSL https://api.github.com/repos/pterodactyl/panel/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -39,7 +39,7 @@ echo 'export PATH="$PATH:/opt/mssql-tools18/bin"' >>~/.bash_profile
 | 
				
			|||||||
source ~/.bash_profile
 | 
					source ~/.bash_profile
 | 
				
			||||||
msg_ok "Installed SQL Server Tools"
 | 
					msg_ok "Installed SQL Server Tools"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
read -r -p "Do you want to run the SQL server setup now? (Later is also possible) <y/N>" prompt
 | 
					read -r -p "${TAB3}Do you want to run the SQL server setup now? (Later is also possible) <y/N>" prompt
 | 
				
			||||||
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
 | 
					if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
 | 
				
			||||||
  /opt/mssql/bin/mssql-conf setup
 | 
					  /opt/mssql/bin/mssql-conf setup
 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user