Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Admin9705 committed Sep 2, 2024
1 parent 95aedd5 commit 4a745a6
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions mods/scripts/apps_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,29 @@ NC="\033[0m" # No color
app_name=$1
script_type=$2 # personal or official

#!/bin/bash

# Name of the Docker network to check or create
network_name="plexguide"

# Function to check and create the Docker network
check_and_create_network() {
# Check if the Docker network exists
if docker network ls --format '{{.Name}}' | grep -wq "$network_name"; then
# Network exists, no action needed
return 0
else
# Network does not exist, attempt to create it
echo "Creating Docker network '${network_name}'..."
if docker network create "$network_name" --driver bridge; then
echo "Docker network '${network_name}' created successfully."
else
echo -e "\033[0;31mFailed to create Docker network '${network_name}'.\033[0m"
read -p "Press [ENTER] to acknowledge the error and continue..."
fi
fi
}

# Function: Deploys / Redploys App
redeploy_app() {
# Check if lspci is installed; detect NVIDIA graphics cards
Expand All @@ -18,6 +41,9 @@ redeploy_app() {
fi
fi

# Run the network check and creation function
check_and_create_network

echo "Deploying $app_name"

# Determine which support script to source
Expand Down

0 comments on commit 4a745a6

Please sign in to comment.