From da1e37b9ce9697d19e347ef05e38076efadacb24 Mon Sep 17 00:00:00 2001 From: Roger Gonzalez Date: Fri, 6 Jan 2023 17:40:53 -0300 Subject: Added comments --- install.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'install.sh') diff --git a/install.sh b/install.sh index 5492c63..bf4d160 100755 --- a/install.sh +++ b/install.sh @@ -19,6 +19,9 @@ echo "We just need you to answer some questions" echo "====================================================" echo "" +# ============================================================================================ +# Check all the prerequisites are installed before continuing +# ============================================================================================ echo "Checking prerequisites..." if command -v docker &> /dev/null; then @@ -34,7 +37,11 @@ else echo "⚠ You need to have docker-compose installed and in your PATH! EXITING ⚠" exit 255 fi +# ============================================================================================ +# ============================================================================================ +# Gathering information +# ============================================================================================ read -p "Where do you want to instal the docker-compose file? [/opt/yams] : " install_location read -p "What's the user that is going to run the media server? [$USER] : " username @@ -48,7 +55,11 @@ puid=$(id -u $username) pgid=$(id -g $username) echo "Configuring the docker for the user $username on \"$install_location\"..." +# ============================================================================================ +# ============================================================================================ +# Actually installing everything! +# ============================================================================================ # Checking if the install_location exists [[ -f $install_location ]] || mkdir -p $install_location || (echo "You need to have permissions on the folder! EXITING" && exit 255) @@ -65,3 +76,4 @@ sed -i -e "s//$pgid/g" $filename # Set entertainment_folder sed -i -e "s;;$ENTERTAINMENT_FOLDER;g" $filename +# ============================================================================================ -- cgit v1.2.3